Monday, October 26, 2015

Saving and Archiving Photos

Let's say you're scanning in photos or documentation and need to decide how you're going to save them. What file format do you use? For the non-technically minded, file format means what file type you are using. On Windows computers, the file extension tells Windows how to open the file. For example, Windows knows to use Microsoft Word to open a .doc file and a web browser to open an .html file. Image files can be in the format of .jpg (jpeg), .bmp (bitmap), .tif, .png and many others. The difference is mostly in how the file is compressed, meaning how small the file is made for the same size photo.

Many people say to only save scans and photos in .tif format. The reason for this is that a .tif file is not compressed at all. The file tells the photo viewer/editor that this bit is this color, the next dot is another color and so on for every single dot in the photo. The larger the dimensions of the photo, the larger the file size, no matter what. This way, when a file is edited and resaved, all of the changed bits are changed in the file and the file size remains the same.


A jpeg file, however, is compressed. This means that the file tells the photo viewer that from this dot to this dot, all of the dots in between are close enough to this color, and all of the dots between the next set of dots are a different color. It approximates the colors for a group of pixels (dots) instead of specifying the exact color for each and every pixel. This allows the file size to be much smaller. Most images on the web are saved in jpeg format, although .png is becoming more popular. Most of the other file types also compress photos. The difference is the way the file is compressed.

The problem with compressed files is that when you edit the file and resave it, it is then recompressed before it is saved. This means it takes a compressed file, makes your changes to it, then compresses it again. To do this, it resamples the colors of the image to recalculate how to save the file using the smallest amount of file space. Each time this happens, you lose more of detail of the image. For a file you're going to edit many times over, you definitely don't want to save the file like this
This screenshot of my Family Tree DNA chromosome map has been resaved and recompressed multiple times. You can see the jpeg artifacts that are now part of the image. Imagine a highly detailed old photograph that has been resaved many times.
However, if you manage your files correctly, you can save drive space and still not lose detail every time you extract a copy of the file. What I mean is this, When you first scan in a file, scan it in at the highest resolution feasible at the time. Scan it in at at least 600 dpi. You can also do 1200 or even 2400 dpi if the photo is large, especially if the fine detail is important, like a small photo or a photo of many people, where they each appear small.

If you scan it in at a high enough resolution, saving it as a jpeg file will be fine because the corruption added to the image will be smaller than the finest detail of the original photo. Then, once it is saved once, never resave the file over the top of the old file. Should you ever decide to add text to the image border or lighten or darken the image or adjust the contrast, be sure to save it to a new file. Always leave your original scan alone. Never edit and save to the same file. This way, you won't lose any detail by recompressing an already compressed image. While disk space to save your files is cheap, having a large number of enormous files will be very difficult to work with. Save them as a compressed file, just don't recompress the image to the same file.

--Matt

No comments:

Post a Comment