Image Formats

While the number of image formats is large, there are a few that are well known and commonly used. In this chapter, we will only mention the image formats that are most often associated with Web browsers: GIF, JPEG, and PNG; as well as a sample format called ch5, which we will use for illustrative purposes throughout this chapter.

GIF: Graphics Image Format

The Graphics Image Format (GIF; also referred to as CompuServe GIF format) represents each pixel using 3 bytes, depicting its red, green and blue color components. This format takes all the unique sets of color components within the GIF image(not exceeding 256) and puts them into a color table. This limits the number of colors that can be represented in a GIF image to 256 out ...

Get Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.