Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Reference Guide: Graphics Technical Options and Decisions : Page 11

The decisions you make about file format, compression, palette, resolution, and bit depth effect both quality and download speeds


advertisement
Lossless Compression
Lossless compression never removes any information from the original file. It relies instead on representing data in mathematical formulas.

GIF and PNG use lossless compression; these formats reduce the image file size without losing any image data. Magic? Not really ...

To understand, we must journey deep into the heart of the GIF file format. As you know, bitmaps store color information pixel by pixel, in rows and columns. GIFs are read horizontally, left to right, row by row. For example:




The pixels in the first row of this bitmap are:

  • white, white, white, white, black, black, black, black, black, black, black, white, white, white, white, white

GIF compression, however, sees a golden opportunity to compress the pixel-color data:

  • 4 white, 7 black, 5 white

Voil

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date