Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

save TImage into html file

Posted on 2006-07-22
3
Medium Priority
?
265 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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

886 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