Images

Discussion in 'HTML' started by freesoft_2000, Jul 19, 2005.

  1. 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
    freesoft_2000, Jul 19, 2005
    #1
    1. Advertising

  2. freesoft_2000 wrote:

    > 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).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jul 19, 2005
    #2
    1. Advertising

  3. 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
    freesoft_2000, Jul 19, 2005
    #3
  4. freesoft_2000 wrote:

    > 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.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jul 19, 2005
    #4
  5. freesoft_2000 wrote:

    > 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.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 20, 2005
    #5
  6. freesoft_2000

    Mark Parnell Guest

    Previously in alt.html, "Jonathan N. Little" <>
    said:

    > 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. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
    Mark Parnell, Jul 20, 2005
    #6
  7. freesoft_2000

    lostinspace Guest

    ----- 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.
    lostinspace, Jul 20, 2005
    #7
  8. freesoft_2000

    dorayme Guest

    > From: "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
    >
    >


    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
    dorayme, Jul 20, 2005
    #8
  9. dorayme wrote:
    <snip>
    >
    > 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!

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 20, 2005
    #9
  10. 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
    freesoft_2000, Jul 20, 2005
    #10
  11. freesoft_2000 wrote:

    > 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.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 20, 2005
    #11
  12. freesoft_2000 wrote:

    > 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
    Animesh Kumar, Jul 21, 2005
    #12
  13. freesoft_2000

    dorayme Guest

    > From: "Jonathan N. Little" <>
    >dorayme wrote:
    ><snip>
    >
    >> 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.
    >>
    >> 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).

    >
    >
    > 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
    dorayme, Jul 21, 2005
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    4
    Views:
    872
    Eliyahu Goldin
    Jan 4, 2005
  2. Luis Esteban Valencia Muñoz
    Replies:
    0
    Views:
    745
    Luis Esteban Valencia Muñoz
    Jun 3, 2005
  3. wardemon

    Cache Images vs Static Images

    wardemon, Jun 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    636
    bruce barker
    Jun 14, 2007
  4. Keith Hughitt
    Replies:
    6
    Views:
    1,052
  5. Adrienne Boswell
    Replies:
    1
    Views:
    493
    dorayme
    Aug 4, 2009
Loading...

Share This Page