(pianoPed) file types for images and graphics

I’m not going to focus on too many topics related to image editing, as that is a discipline unto itself. I do want to talk about file formats, compression, and cropping.

gif, jpeg, and png

The three file types for web images are GIF, JPEG, and PNG. Photographs (pictures of natural images, people, etc.) should use the JPEG format, as it uses a compression algorithm specifically designed to handle continuous changes in color tone better than GIF and PNG. Computer drawings and animated characters (which includes many types of logos) will usually be better as a GIF or PNG, depending on the image size. Small images will result in smaller files sizes with GIF format. Larger images will produce smaller file sizes with PNG format. In general, if you have a lot of solid colors with distinct color changes, use PNG or GIF. Otherwise (and most of the time) you will use JPEG.

JPEG uses a lossy compression method that greatly reduces file sizes of photos. You usually have the option of selecting how much compression you want. The more compression, the smaller the file size and the lower the image quality. You can experiment to see how compressed you can go before the image quality suffers for a particular file. GIF compresses images by assigning a color from a 256-color palette, and then describing the area that the color fills. JPEG images can show millions of colors, even with compression. PNG works in a manner similar to GIF, but is non-patented. PNG and GIF both use a lossless compression scheme.

Converting Files

iPhoto can export photos as JPG files. You can also convert between many image formats using Preview (most often used on the Mac to view pdf files). Open any image in Preview and choose “Save As…” from the File menu. From the next dialog box you have the option of choosing different file types for images.

Image Size and Cropping Files

From the Mac Finder you can select a file and see it’s image size in pixels, horizontal x vertical. Although monitor resolutions and pixel sizes vary, 72 pixels per linear inch is the general standard.

Cropping is a process where you select the portion of an image that you want to use and eliminate the remainder of the image. In Preview, use the rectangular selection tool. As you drag the rectangle to resize the selection you will see the size of the selection in pixels hover along with the moving cursor. Choose “Crop” from the Tools menu to discard the remainder of the image.

After cropping a file it is usually best to use the “Save As…” command so that you still have the complete, original file.

A Final Tip About Compression and Image Editing

It is best to keep an uncompressed version of the original image file to use for editing. Save your work as uncompressed files as you edit (PNG on the Mac works well). Once you get the image the way you want it, then save it once as a compressed file.

Why work on uncompressed files? Each time you save a JPEG file it compresses the file again. Continually re-compressing a file will greatly diminish its visual quality, even at relatively low compression rates.


Comments

Leave a Reply