Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"When you need full color, but don’t need transparency, use JPEG instead."

No. Don't. JPEG is for photos (and rarely for gradients). For drawings, line art, cartoons, clip art, etc. use 24bit PNGs - they work just fine.



Indeed, PNG is very good at losslessly compressing artificial images which have large uniform (or gradient) areas, such as diagrams, drawings and so on.

SVG(.gz) could be even more compact (and just as important, resolution independent), but alas we'll have to wait a bit before support in browsers is common.


You're right — I could have made that clearer. My main concern was people saving photos as PNG (and then thinking PNG sucks, because files are so big)


For line arts, you can probably use 8bit PNG.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: