Images

F

freesoft_2000

Hi everyone,

I am trying to add pictures and so far everthing has
been going well but i have a question. When i insert the pictures they
show up and i am able to save the entire html document to disk in html
format.

The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

Basically my question is that is it possible to
implement something like that in which that the picture is embedded in the
html and it does not matter if the picture is deleted or not from the disk
thus even when the html document is opened the embedded picture is still
there.

This is code that i am using to insert the picture

<html>
<head>
</head>
<body>
<p>
<img height="400" width="400" src="file:/D:/Sample_Pics/venu.jpg">
</p>
</body>
</html>

See the reliance on the picture picture always being on that location on
the disk on this line

src="file:/D:/Sample_Pics/venu.jpg"

Is there a way to achieve what i need by simple ways or style sheets or
any other way??

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
 
D

David Dorward

freesoft_2000 said:
The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Inserting images in HTML documents is done with an image element that
includes the URL of the image.
Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

You could use a data: URL scheme, but browser support is pretty limited
(Internet Explorer, for example, does not support the data: scheme).
 
F

freesoft_2000

Hi everyone,

For myself browser support is not a priority an thus it does
not bother me. Back to the question at hand David you said this can be
achieved via data: URL scheme.

How would you go about doing this assuming the location of
the image is the same as in my first post??

If it is of no inconvinience to you could you post a sample
code on how this could be achieved.

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
 
D

David Dorward

freesoft_2000 said:
For myself browser support is not a priority an thus it does
not bother me. Back to the question at hand David you said this can be
achieved via data: URL scheme.

How would you go about doing this assuming the location of
the image is the same as in my first post??

I've never done it as it is of so little practical use. The details are in
http://www.faqs.org/rfcs/rfc2397.html and on Google.
 
J

Jonathan N. Little

freesoft_2000 said:
Hi everyone,

I am trying to add pictures and so far everthing has
been going well but i have a question. When i insert the pictures they
show up and i am able to save the entire html document to disk in html
format.

The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

Basically my question is that is it possible to
implement something like that in which that the picture is embedded in the
html and it does not matter if the picture is deleted or not from the disk
thus even when the html document is opened the embedded picture is still
there.

This is code that i am using to insert the picture

<html>
<head>
</head>
<body>
<p>
<img height="400" width="400" src="file:/D:/Sample_Pics/venu.jpg">
</p>
</body>
</html>

See the reliance on the picture picture always being on that location on
the disk on this line

src="file:/D:/Sample_Pics/venu.jpg"

Is there a way to achieve what i need by simple ways or style sheets or
any other way??

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
I am not sure what you are asking, but I think you misunderstand what an
HTML document is. When you embed and image in HTML document the image
code does not actually get put into the document like a Word document.
An HTML document is like a script for a play saying 'you stand over
there' and 'you be 12 pixels high' so when you put an image in a webpage
all the HTML document does is say 'the image named *somePix.jpg* located
in *someFolder*, you go here in on the page and format this way'. If
you delete the image the script will still be direction that the image
be there, just the *actor* (ie, the image) will be missing..... You have
to change the script if you want to remove the image.
 
M

Mark Parnell

An HTML document is like a script for a play saying 'you stand over
there' and 'you be 12 pixels high' so when you put an image in a webpage
all the HTML document does is say 'the image named *somePix.jpg* located
in *someFolder*, you go here in on the page and format this way'. If
you delete the image the script will still be direction that the image
be there, just the *actor* (ie, the image) will be missing..... You have
to change the script if you want to remove the image.

Nice analogy. I like that. :)
 
L

lostinspace

----- Original Message -----
From: "freesoft_2000" <>
Newsgroups: alt.html
Sent: Tuesday, July 19, 2005 3:19 PM
Subject: Images

Hi everyone,

I am trying to add pictures and so far everthing has
been going well but i have a question. When i insert the pictures they
show up and i am able to save the entire html document to disk in html
format.

The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

Basically my question is that is it possible to
implement something like that in which that the picture is embedded in the
html and it does not matter if the picture is deleted or not from the disk
thus even when the html document is opened the embedded picture is still
there.

This is code that i am using to insert the picture

<html>
<head>
</head>
<body>
<p>
<img height="400" width="400" src="file:/D:/Sample_Pics/venu.jpg">
</p>
</body>
</html>

See the reliance on the picture picture always being on that location on
the disk on this line

src="file:/D:/Sample_Pics/venu.jpg"

Is there a way to achieve what i need by simple ways or style sheets or
any other way??

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West

There is a way to accomplish what you desire, however it has it's
disadvantages.
Such as lack of browser compataiblity.

VML (Vector Markup Language).
Do a google and "if" possible, find an alternative to MS.
 
D

dorayme

From: "freesoft_2000 said:
Hi everyone,

I am trying to add pictures and so far everthing has
been going well but i have a question. When i insert the pictures they
show up and i am able to save the entire html document to disk in html
format.

The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

Basically my question is that is it possible to
implement something like that in which that the picture is embedded in the
html and it does not matter if the picture is deleted or not from the disk
thus even when the html document is opened the embedded picture is still
there.

This is code that i am using to insert the picture

<html>
<head>
</head>
<body>
<p>
<img height="400" width="400" src="file:/D:/Sample_Pics/venu.jpg">
</p>
</body>
</html>

See the reliance on the picture picture always being on that location on
the disk on this line

src="file:/D:/Sample_Pics/venu.jpg"

Is there a way to achieve what i need by simple ways or style sheets or
any other way??

Any help is greatly appreciated

OK, I trust you have taken on board Jonathan N. Little's excellent
analogy. Perhaps this adds something you may find helpful: The picture
is not "in" the html doc, as he explained. In a sense it *could* be -
but I don't know what the point would be? For example, you could have
the html text with pics in a Word doc or in a page layout doc or
embedded in an Illustrator file to look at. It would not be useful for
web implementation, perhaps more a memento or work of art, perhaps
celebrating a fine bit of html you are proud of.

But I sense that you are wanting to have a file that is the web page
itself somehow, in it's full expression. When you double click this one
file with no pic files or any others needed, it opens in a browser in
its full glory. Fine.

This is pretty much what happens when you save a web page in *some*
browsers. The browsers that have this capability ask you whether you
want to save the HTML itself or as a "web archive". Different browsers
do it different. For example, my IE 5 for a Mac asks this and has its
secret formula for doing it. You get a file that embeds all, there are
no associated files, no distinguishable pic files, html text files, css
files. It is all in a top secret proprietary coca cola formulae. It is
quite neat. The advantages are not great though, more a curiosity (there
are some pros and some cons).

So, you could open your original html in a browser like IE 5 for the
Mac, it will find the picture and display it. You could then save as a
web archive. You then could throw out your pic or move the web archive
to a CD and play it on another computer and your pic and all will
appear. You can recover the original files by looking and saving the
source code and saving the pics etc (the reverse). One little curiosity
is that you cannot easily recover any linked css file! Even though it
has been plainly taken into account. IE Mac developers have been
thinking hard and have done something quite clever and not a little
untransparent!

Some browsers merely save all the files when you want to save the
whole web page (or site, I will leave this complication out). For
example, my WaMCom Mozilla open source 1.3 calls it saving as a "Web
page, complete". Now what happens here is different to IE, here the
program simply saves the html and puts pics and linked css files in a
folder (just one level under the html) - basically and approximately
recovering the sort of arrangement that the web designer had on his
computer. Here there would be no advantage for you given that you perhaps
see an advantage in the "all embedded" secret technology of MS in IE.

Personally I like the way Mozilla does it because it is more transparent
and saves you work when you want to get all the files (to save and learn
from or change them, perhaps offline).

It is maybe rather different in the PC world. It is an interesting
matter though.

dorayme
 
J

Jonathan N. Little

dorayme wrote:
But I sense that you are wanting to have a file that is the web page
itself somehow, in it's full expression. When you double click this one
file with no pic files or any others needed, it opens in a browser in
its full glory. Fine.

This is pretty much what happens when you save a web page in *some*
browsers. The browsers that have this capability ask you whether you
want to save the HTML itself or as a "web archive". Different browsers
do it different. For example, my IE 5 for a Mac asks this and has its
secret formula for doing it. You get a file that embeds all, there are
no associated files, no distinguishable pic files, html text files, css
files. It is all in a top secret proprietary coca cola formulae. It is
quite neat. The advantages are not great though, more a curiosity (there
are some pros and some cons).

So, you could open your original html in a browser like IE 5 for the
Mac, it will find the picture and display it. You could then save as a
web archive. You then could throw out your pic or move the web archive
to a CD and play it on another computer and your pic and all will
appear. You can recover the original files by looking and saving the
source code and saving the pics etc (the reverse). One little curiosity
is that you cannot easily recover any linked css file! Even though it
has been plainly taken into account. IE Mac developers have been
thinking hard and have done something quite clever and not a little
untransparent!

Some browsers merely save all the files when you want to save the
whole web page (or site, I will leave this complication out). For
example, my WaMCom Mozilla open source 1.3 calls it saving as a "Web
page, complete". Now what happens here is different to IE, here the
program simply saves the html and puts pics and linked css files in a
folder (just one level under the html) - basically and approximately
recovering the sort of arrangement that the web designer had on his
computer. Here there would be no advantage for you given that you perhaps
see an advantage in the "all embedded" secret technology of MS in IE.

Personally I like the way Mozilla does it because it is more transparent
and saves you work when you want to get all the files (to save and learn
from or change them, perhaps offline).

It is maybe rather different in the PC world. It is an interesting
matter though.

If you are looking for the single file option, MSIE saves in a
single-file archive format MHT. It is a MS format so compatibility is an
issue. Mozilla has it own single-file archive format MAF. Installing the
extension does also allow reading of the MHT format, but this may not be
an answer for all browsers.

Maybe an HTML document is not what you want, but something more like an
Adobe Acrobat PDF, or since this is to be on disk abandon the web page
concept entirely and do a PowerPoint presentation!
 
F

freesoft_2000

Hi everyone,

i noticed that there is a tag called [embed] in html.

Can i use this tag to actually embed the image directly into
the html document
like what people do with sound and video??

If i can how can i go about doing it??

Sample codes would be helpfull

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
 
J

Jonathan N. Little

freesoft_2000 said:
Hi everyone,

i noticed that there is a tag called [embed] in html.

Can i use this tag to actually embed the image directly into
the html document
like what people do with sound and video??

If i can how can i go about doing it??

Sample codes would be helpfull

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
1: EMBED is not part of the 4.01 HTML standard but an old Netscape
element, OBJECT is the correct element

2: Again, if you look at the attributes, EMBED's SRC or OBJECT's DATA,
it is a URI to the resource *external* to the HTML document. Again, HTML
is just a plain text 'script', there is no embedded binary data.

3: If you want to have a single file document, HTML is *not* the right
choice, PDF, PowerPoint, Word DOC and such is what you want. Wrong tool
there Richard.
 
A

Animesh Kumar

freesoft_2000 said:
Hi everyone,

I am trying to add pictures and so far everthing has
been going well but i have a question. When i insert the pictures they
show up and i am able to save the entire html document to disk in html
format.

The thing is when i delete the picture on the disk and
open the html document the picture does not show up but if the picture is
not deleted from the disk then when i open the html document the picture
shows up.

Basically what i need to know if there is a way in
which i can embed a picture into the html document without any reliance on
the picture that is saved on a different location on the disk.

Basically my question is that is it possible to
implement something like that in which that the picture is embedded in the
html and it does not matter if the picture is deleted or not from the disk
thus even when the html document is opened the embedded picture is still
there.

This is code that i am using to insert the picture

<html>
<head>
</head>
<body>
<p>
<img height="400" width="400" src="file:/D:/Sample_Pics/venu.jpg">
</p>
</body>
</html>

See the reliance on the picture picture always being on that location on
the disk on this line

src="file:/D:/Sample_Pics/venu.jpg"

Is there a way to achieve what i need by simple ways or style sheets or
any other way??

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West


HTML using images from local directory has been very well explained so
far. However, you can go for SVG or scalable-vector-graphics in certain
cases to enjoy "dynamic resizing" and "embedded code" facility. But
then, if you think in terms of CSS, background and all such imagery will
be lost if you don't use external images.

Best
A
 
D

dorayme

From: "Jonathan N. Little said:
dorayme wrote:



If you are looking for the single file option, MSIE saves in a
single-file archive format MHT. It is a MS format so compatibility is an
issue. Mozilla has it own single-file archive format MAF. Installing the
extension does also allow reading of the MHT format, but this may not be
an answer for all browsers.

Maybe an HTML document is not what you want, but something more like an
Adobe Acrobat PDF, or since this is to be on disk abandon the web page
concept entirely and do a PowerPoint presentation!


I guess we are all trying to imagine what the OP really wants and why! Not
quite sure he has helped too much - but I may have missed his explanations?

dorayme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top