SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: HTML - Images

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    Mars
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question HTML - 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

    Code:
    <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

    Code:
    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

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The short answer is no. HTML is markup. It has no data embedding capability in itself.
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    Mars
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Hi everyone,

    I know you said no but 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

  4. #4
    SitePoint Wizard bronze trophy KevinR's Avatar
    Join Date
    Nov 2004
    Location
    Moon Base Alpha
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by freesoft_2000
    Hi everyone,

    I know you said no but 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

    The answer is still no. The embed tag is just used to display various media, not make sure it's physically encoded into the document somehow. There is no way to do what you want. I humbly suggest you stop wasting time trying to figure out how to do what you are trying to do. Images must be physically stored on disk in the folder and with the name that that the src attribute points to:

    <img src="http://www.site.com/images/frog.jpg">

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,156
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    Lightbulb HTML - Images

    Actually, you CAN have a picture in pure HTML without an image file. All you have to to do is determine the color value of each pixel and HTML will paint it to your browser. This is too much work for most people and there are no tools that will do it for you. Just create a page structure to hold all your background-color: values and through trial and error you'll get there. Just bear in mind that a 100x100 pixel image has 10,00 pixels to render, so give yourself plenty of time to get the colors right.

  6. #6
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just realized this but what is this thread doing in this forum?
    Aaron Brazell
    Technosailor



  7. #7
    SitePoint Wizard bronze trophy KevinR's Avatar
    Join Date
    Nov 2004
    Location
    Moon Base Alpha
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague
    Actually, you CAN have a picture in pure HTML without an image file. All you have to to do is determine the color value of each pixel and HTML will paint it to your browser. This is too much work for most people and there are no tools that will do it for you. Just create a page structure to hold all your background-color: values and through trial and error you'll get there. Just bear in mind that a 100x100 pixel image has 10,00 pixels to render, so give yourself plenty of time to get the colors right.
    I am sure there are programs that will convert an image into html code. That is definetly not the same thing as what the poster is asking to do.

    Might work though, good suggestion.

  8. #8
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,156
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    HTML Images

    Yes, I guess what freesoft 2000 is looking for is something like a compiled HTML page. I checked back on this thread to mention SVG as an image alternative. Sketch is right though, discussing SVG, and the rest of this thread, should be in the Graphics and Multimedia forum.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •