DISQUS

DISQUS Hello! Elliott Back's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Convert Image to CSS — Elliott C. Back

Started by elliottback · 8 months ago

No excerpt available. Jump to website »

24 comments

  • Very impressive!

    You might want to look into using a few optimisations to keep the 'file size' down. Maybe you could assign the colours to a 2D array and then have javascript do the "marking up" so you don't get those really long span html lines.

    I suppose you could also look at using floating divs to implement a gif like mechanism of compression?

    Congrats on a pretty unique idea that might or might-not be useful; but is cool none the less.
  • I went ahead and tried making that 2D array javascript version and when running on the slashdot logo (http://images.slashdot.org/title.gif); the size of the html document my version produced was 125KB, as opposed to 360KB. With that being said the browser practically freezes while all the Javascript runs, so it's a pretty ugly solution in practical terms.

    I can post code if you're really interested; but I don't think you'd have too much trouble reproducing it yourself.
  • I thought about using javascript to mark it up, or using a table with colored cells, or using divs with variable width, but those really won't help much! GZip worked allright, but then my server died on big images because I was buffering 12mb of text into memory, and the memory limits are set quite low.

    If you want to leave a link to a post with your code (if you have a blog), that would be cool, too. The more code, the merrier!
  • V. nice
  • Oh, hey, when you have some time, coulda update the url for my blog? The re-direct will be going down soon. Thanks =]
  • I've been working on the same kinda concept for a while now. But instead of taking an image and converting it, I'm taking Javascript code to populate my divs with spinning cubes, torusses, etc etc, ala "demo scene" (i'm going to a party in Finland in July, so hopefully this concept will be finished to demo it). I'll make my code available when it's finished (which might be an hour before entry!).

    Cheers guys,
    Juan
  • Chris Hester did something similar last year. His version won't let you choose the image or the resampling ratio, but he does demonstrate some interesting filtering ideas. See his original post, CSS demo, and JavaScript demo.
  • As programming goes, this is cool.

    But for web accessibilty, this is not A Good Thing™
  • I'd love to have a exe-file-version to download of this thing.

    I don't need a CSS-Output, but just a plain Ini-File Output
    such as

    Pixel_1,1=234
    Pixel_1,2=221
    Pixel_1,3=112
    ...
    Pixel_2,1=214
    Pixel_1,2=234
    ...
    Pixel_n,n-1=234
    Pixel_n,n=234

    or alternative:

    Pixel_1_X=40
    Pixel_1_Y=12
    Pixel_1_Col=240

    Pixel_2_X=51
    Pixel_2_Y=17
    Pixel_2_Col=210

    Another Problem which I encounter is
    the high sensibility on Colours.

    I understand, it is required, but if you take
    http://photos1.blogger.com/blogger/5239/1811/16...
    for instance, it is not black and white at all.

    That makes the parsing harder...

    Thanks a lot!

    Greetings!
  • Huh. very neat but, the larger images seem to cause FireFox to suddenly quit responding during the conversion process. I'm using sixpop to host my images then I'm converting them But, It's just not real smooth. I'll stick to using images for now.
  • Sorry for the broken link (above)
    http://sixpop.com/images/
  • Wow!! Amazing.
  • Verrry kewl. Like Montoya said: it ain't good practice for serious web development, though it is a neat toy :)
  • nothing works now. when are they going to be back?
  • Really freaking awesome!
  • Hi....


    COuld anyone give me the javascript codes ? Thank you
  • ILOVE THIS
  • Will there be a standalone.. download freeware/shareware utility.. for more practical image conversion?
  • I am trying to design my eFriends software to fit the needs of my community. However, I have no clue about HTMLs. I don't know how to convert my logo to an HTML or any texts.

    Does anyone know how to design eFriends...and can you explain it in layman's terms?
  • Well,i would like to have this image as a css code!!!
  • Our company is looking at moving to Windows Live Mail. But we have discovered unlike Outlook and Hotmail that it does not support images in the signature. Microsoft's solution is to convert the image (our logo) to HTML. In doing so it looses all its quality as a logo. Ideas? Thanks.
  • Doesn't work for me, crashes FF3 when I click on submit.
  • Chrome + RAM is your friend!
  • I'm not going to use a browser like Chrome that doesn't ask me in what folder I want to install it, plus it has privacy issues. And 2GB RAM should be enough to convert a 16x16 pixel GIF image to CSS.

Add New Comment

Returning? Login