Solved

save TImage into html file

Posted on 2006-07-22
3
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 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