Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   HTML imaging idea (http://www.chiefdelphi.com/forums/showthread.php?t=22907)

golf_cart_john 02-12-2003 23:00

HTML imaging idea
 
A bit ago, I came up with an interesting idea for representing images using HTML. I can see very little practical purpose for this concept, but some of you might find it useful. I've written a small C++ routine that converts a bitmap image into HTML code, and displays the image correctly. To see what this looks like, go to http://www.geocities.com/htmlgames/h...ging_demo.html . Look at its source to see something very interesting. Right now, the translation results in very inefficient image encoding, about 25 bytes of html for 3 bytes of BMP format image. If you want to see the code, send me a private message & I'll send you the code. I would love it if someone wants to make it more efficient (maybe with JPEG-style compression) and actually use it for something.

Brandon Martus 02-12-2003 23:44

Re: HTML imaging idea
 
maybe its me, but I don't see anything.

Using Mozilla Firebird. Tried in IE6, and it crashed.

Noah 03-12-2003 00:08

Re: HTML imaging idea
 
Quote:

Originally Posted by Brandon Martus
maybe its me, but I don't see anything.

Using Mozilla Firebird.

Confirmation: Firebird doesn't like this.
Mozilla 1.5 doesn't either.

golf_cart_john 03-12-2003 08:27

Re: HTML imaging idea
 
Try http://www.geocities.com/htmlgames/small_demo.html . It's a smaller version of the same stuff. The other image is a massive amount of HTML (because of my program's inefficiency), and it may have taken up enough memory to make the browser crash. Thanks for letting me know.

Brandon Martus 03-12-2003 08:34

Re: HTML imaging idea
 
still not seeing anything (in IE6)

golf_cart_john 03-12-2003 08:44

Re: HTML imaging idea
 
Quote:

Originally Posted by Brandon Martus
still not seeing anything (in IE6)

That's really weird. You're not seeing a little GIF-like graphic of the number 95? or a similar graphic about Flower Power? It works in IE 5.5. Does IE 6 crash?

Brandon Martus 03-12-2003 09:26

Re: HTML imaging idea
 
oh. i have been seeing it then. thought those were part of the Geocities ads or something.

leo_singer 03-12-2003 13:45

Why no one is seeing anything
 
The reason it doesn't show up in some browsers is that some browsers skip over rendering table datum (<td>...</td>) elements if they are empty. One common solution if you need an empty table cell that just takes up space and contains a colored background is to put a nonbraking space inside, like this:

<td>&nbsp;</td>

By the way, with a program like this you might try implementing a GIF-style lossless compression scheme, whereby if you have several identical adjacent pixels you represent it as a single <td>...</td> with the width attribute greater than 1.

djcapelis 03-12-2003 13:55

Re: HTML imaging idea
 
GIMP has been able to output to standards compliant all-browser compatable HTML with images for a long time now. What's different about this?

Or perhaps you just didn't know about it... you coulda just used their code (under appropriate license)... it's an open-source project after all.

I would encourage anyone who feels the need to convert a format to HTML use GIMP. It's not limited with the bmp->html either as anything it can open can be saved as HTML.

www.gimp.org


All times are GMT -5. The time now is 00:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi