News for hackers. Stuff that matters.
Re:PNG vs JPG: 6 simple lessons you can learn from our mistakes by IgorPartola on Monday April 26, 2010 @08:17AM (#1294668)
And lay out your "images" via CSS and try to make it work on all browsers? On top of that, for a complex image, you'll end up encoding your image data in JS or HTML or some other text format, which would take up much more space than a format like JPG/PNG/GIF. Those formats are designed to handle images and that's all they do.

Plus, with JS you wouldn't necessarily get immediate rendering of the image, so you would be making the UX worse, not better.

Re:PNG vs JPG: 6 simple lessons you can learn from our mistakes by AndrejM on Monday April 26, 2010 @09:58AM (#1294855)
That is not what I meant, actually. I meant rendering a logo via some paint methods, where all the information the methods have is some text, color and style attributes, etc. Then the logo gets drawn on-the-fly by the user's browser. It could work for simple logo's, I believe.
Re:PNG vs JPG: 6 simple lessons you can learn from our mistakes by dhimes on Monday April 26, 2010 @10:35AM (#1294950)
This is worth a try for a lot of reasons. If not for logos, then for buttons on your site. When I switched to painted buttons vs images in my downloadable desktop software, I (1) saved a lot of space on downloads, and (2) saved a TON of time whenever I wanted to add a new button or change the color scheme, or gradient, or shadow, etc. Re-creating each button (even just creating a new one) was a total pain in the ass compared to simply instantiating a new button or playing with the paint method.

I haven't tried it in html5 yet, but if I use buttons on the page I will definitely give this a shot.

Re:PNG vs JPG: 6 simple lessons you can learn from our mistakes by IgorPartola on Monday April 26, 2010 @10:35AM (#1294948)
Yes, but everything you describe can be done with CSS as well: loading custom fonts, background colors, even gradients.