?
Solved

save TImage into html file

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 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