Image File Formats
If you enjoy my free writings, please consider my $19.95 digital art tutorial ebook, Art Head Start, for computer artists.
This tutorial is from my ebook.
Vue Versions:
All
Experience levels:
Beginner
References:
Wikipedia - image file formats
Intro
High quality images often require millions of pixels, so they make large files. These files are difficult to transport, especially over the Internet. Various file formats have been devised to help with this problem, sometimes by compressing the file to remove pixels.
What your pixels look like in practice is controlled by your operating system and display hardware and by the image file format you choose. The popular formats for storing images have differences that affect the look of your work.
Understanding Image File Formats
Practically speaking, there are the “Lossless” formats, which produce large file sizes, but without affecting your image’s pixel resolution. Use these to store original images without compromising quality. Such files are too large to view over the Internet conveniently and take up lots of space on your storage media.
Then there are “Lossy” file types which compress your image files down to more practical sizes. These formats cause more or less visible (and always irreversible) damage to your images and compromise image editing you might do in the future.
Popular image file formats
| Name | Color Type | Loss? | Transparent? | Bit Size | Notes |
| BMP | RGB Color | No | Separate Alpha | 1,4,8,16,24 | Windows native, seldom compressed |
| GIF | Index Color | Yes | Yes | 8 | Variable color, dither, simple animation |
| JPEG | RGB Color | Yes | No | 24 | Variable compression, “Progressive” |
| PNG | IndexColor | Yes | Yes | 1 to 64 | 1 to 64 Variable color backgrounds |
| PSD | Various | No | Yes | 8,16 | Adobe Photoshop™ native, layers |
| TIFF | RGB Color | No | Yes | 8,16,32 | 8,16,32 Many features, IBM/Mac versions |
| RAW | Digital Sensor | No | No | 36 | Digital camera data direct from sensor |
*Technically, GIF and PNG use “lossless” compression. In practice, they can degrade images.
See the Wikipedia main link, or the links for each format “Name” above, for details.
The “Bit Depth” of an image is the number of unique combinations available in the binary number sequence used to store it. For example, a 1 bit image (21) can have only black and white, represented by either a 0 or a 1. The 8 bit formats store 256 or (28) colors – not enough to display continuous tones. 24 bit formats (224) store 16.77 million colors, more colors than your eye can discriminate. It’s typically used with blends of 8 bit each for the 3 RGB colors. 32 bit formats use these same 3 RGB 8 bit colors, plus one 8 bit channel for 256 levels of transparency, called the alpha channel.
The formats I marked as “RGB” allow the display of 24 bit continuous tone images, like photos. However, they are not so good at reproducing hard edges. Index color formats work from a limited palette (set of colors), but render better hard edges. They are most suitable for non-continuous tone logos, text, cartoons, line drawings, maps, etc., where distinct image areas have just one color each.
Suggestions for image format use:
Save your original work in a PSD or TIFF format, so it is not degraded, can be edited later and can be used on a Windows or Mac PC. Use these formats to import high quality images, for example to import a grayscale height map into a 3D program to create the elevations of a 3D terrain. Use PSD or TIFF to send someone an original, high quality image.
When you must have small file sizes, to submit to an online gallery or have your audience access from a Web server, you need GIF, JPEG or PNG. You will typically be dealing with continuous tone images. JPEG will usually compress these the most, and with the least damage, but does not support transparency. PNG is a better choice for transparency. Be sure to save your original images in a lossless file format before making your lossy compressed versions. And always do compression as your last step, so your processing is never applied to an inferior compressed version of your work.
File format examples:
![]() |
![]() |
![]() |
![]() |
![]() |
95% compressed, severe artifacts |
50% compressed, best choice |
5% compressed, file too large |
32 Colors, bad sky banding |
256 colors, slight sky banding |
The tests above show that GIF is not a good file format for continuous tone images. Even the largest GIF palette of 256 colors doesn’t give a smooth sky, and it makes a larger file than a well chosen JPEG compression amount does. A JPEG compression of 55% or even 60% might have been good enough, resulting in an even smaller file size than that of my 2nd example. On the other hand, you’ll see that the GIF format does a better job on hard edges, like the black and white checks and the text. GIF is good for non-continuous tone images. Always do compression by eye and carefully, rather than using default settings.
I don’t show the original test image above. It looks identical to the 2nd test from the left, as it should. Not degrading your original is the whole idea here, after all.
These tests were made in Adobe Photoshop™, where their excellent JPEG compression is shown as a “quality” percent which is the reciprocal of the compression percent. So the first image shows a “quality” of 5% from a 95% compression.
The RAW image format is a special one available for some digital cameras. Most digital camera settings process and compress your images inside your camera, saving space in your camera’s memory to give you more shots. But this lowers image quality. The RAW format saves the data directly from the camera’s light sensor, with a minimum of processing. Of course RAW files are much larger. You process a RAW formatted image in your computer, where you have more control over image quality. There are no standard RAW formats. Each digital camera has a custom RAW format matching its design
That's it until next time! Hope this was helpful.
--jim coe





