Solved

save TImage into html file

Posted on 2006-07-22
3
256 Views
Last Modified: 2010-05-18
I have delphi application with image1 component. I want to save the image1 with some text in html file in specified directory. the html file should be saved in a directory so I can retrieve it later with Webbrowser.
0
Comment
Question by:erwingosepa
  • 2
3 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 17160037
Please check the HTML definition which will tell you that an image can only be referenced via link.
So you can only save the image in JPEG, GIF or PNG and create a HTML file to reference the image.
0
 

Author Comment

by:erwingosepa
ID: 17160276
that is correct, can help me out for delphi create the html file with reference to image. the image can be save in tem directory for reference. I need the source code that create the html with link in it from delphi.
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 500 total points
ID: 17160589
This is rather easy. The basic HTML elements are only a few.
An empty valid page is:

<html>
<head>
<title>title content is optional</title>
</head>
<body>
</body>
</html>

Now lets add an image link
<img border="0" src="Images/myimage.jpg"/>
Of course the link has to be placed in the body area.
The border attribute disables any default link border a browser may add on displaying the image.
The src attribute is an URL which means that the forward slash should be used always. In this case it is a relative link which means it is relative to the HTML file.
Avoid absolute pathes because they make the file OS dependent (only Windows knows the concept of drive letters).
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now