So You Want To Send Me A Photo
A Brief Primer on Digital Photos
by Ken W. Watson

I have a pet peeve - digital photo bloat. It comes in the form of digital photos that are far too large for their intended purpose. This is normally due to the photo being sent in the wrong photo format, or simply too physically large. Read on to learn about how to put your photos on a diet. If you already know all about this, then just skip down to the section on What I Would Like to Receive.

As a general rule, there are four main factors that determine digital photo quality:
1) The quality of the recording device (camera's sensor, scanner).
2) The size (in pixels) of the digital image.
3) The digital format it is stored in (lossless vs lossy compression).
4) The technical proficiency and the "eye" of the photographer.
Several other factors also come into play, but the above are the main factors that determine the overall quality of the original digital photo.

PixelsPhoto Size: The "size" of a digital photo is defined as its size in pixels. A pixel is the smallest colour component of a digital photo. The image size in pixels is usually referenced as 800 x 600, 1520 x 1280, 640 x 480, etc. - the first dimension is the horizontal pixel count, the second the vertical pixel count. The image to the right is 12 x 9 (go ahead, count the pixels). You may have heard the term DPI (dots per inch) referenced in terms of photo resolution or quality. DPI has absolutely nothing to do with digital image quality. More on this later. The "size" in kilobytes or megabytes also has very little to do with image quality since it depends on the file format the photo has been stored in.

File Format: There are three general categories of file format - lossless, lossless compressed and lossy compressed. Lossless simply means that all the original data of the photo is retained. Lossy means that some of the original photo data is lost (and can never be recovered) as the file format compresses the photo. I'll briefly discuss four of the most popular formats:
JPEG (JPG, JPE) - this is a lossy compressed format (even at the highest quality setting). It's a popular format and for 95% of intended photo uses, this is the format that should be used. JPEG takes advantage of the fact that the human eye blends colour. In simple terms, if there are three red pixels in a row, JPEG will throw out the middle red pixel since it isn't needed to accurately render the colour to the human eye. JPEG offers selective compression which unfortunately is not standardized in computer programs. Adobe uses a quality factor of either 0 to 12 (Photoshop CS & Elements), with 12 being the best and 0 being the worst. Ulead PhotoImpact and the popular freeware program Irfanview use a quality factor of 100 to 0, with 100 being the best and 0 being the worst. On the other hand, programs such as Microsoft Picture It use a compression level of 1 to 100, with 100 being maximum compression (equivalent to an Adobe quality factor of 0) and 1 being the lowest compression (equivalent to Adobe 12). Corel PhotoPaint, Jasc Paint Shop Pro, and one of the best JPEG compression programs, CyberView, use a compression range of 0 to 100, with 0 being 0 compression (maximum quality) and 100 being maximum compression (lowest quality). Bottom line is to test the program you use to see which setting provides the best quality and which provides the worst. The pictures below illustrate the differences in compression level. As compression increases, JPEG suffers from "artifacting", the fuzzing and colour blending of pixel edges in the photo. Note that you cannot recover lost data. If you compress a photo to 50% and then load it back in and save it at no (0) compression, it is still the same quality as the 50% compressed photo. You cannot recover the lost information in the photo. The lesson is to always keep a copy of your original photo (it is in effect your negative - don't lose it).
image-example-100 image-example-75 image-example-50 image-example-10
Max Quality - 30 kb
0 compression
quality factor 100
Good Quality - 9 kb
25% compression,
quality factor 75
Moderate Quality - 6 kb
50% compression,
quality factor 50
Low Quality - 3 kb
90% compression,
quality factor 10

TIFF (TIF) - this is a lossless format (either uncompressed or compressed). It is one of the most popular formats for storing digital originals or editing photos. When compressed a TIF file uses a mathematical compression (LZW compression in all programs plus ZIP in some) that makes the file smaller without losing any data. In our little picture example above, the uncompressed TIF version of this file was 67 kb in size, the compressed TIF was 61 Kb in size. Note that even the compressed TIF is more than twice as large as the highest quality JPEG. TIF is NOT a good format for sending files by email.

BMP (BMP) - this is a lossless format (either uncompressed or rarely compressed). It is a format originally used by Microsoft and many programs still default to using it. It produces files of the same file size as uncompressed TIF files. BMP is NOT a good format for sending files by email.

PNG (PNG) - this is a lossless format designed to replace GIF (see below). Similar to GIF it supports background transparency but unlike GIF it can support up to 24-bit colour. It's a format supported by the most recent Internet browsers (but not older browsers). An uncompressed PNG is about the same size as an uncompressed TIF. PNG is NOT a good format for sending files by email.

GIF (GIF) - This is a format that is best used for text and line art. It is a compressed format with a restricted colour palette of only 256 colours. This means that GIF is not suitable for colour photographs. However, with text and line art which has defined edges and a restricted colour palette, GIF is ideal. GIF is also popular on the Internet since it can contain transparent data (allowing backgrounds to show through) and can also contain multiple frames, allowing simple animation.

The photos below, both exactly the same file size (9K) exhibit the advantages of GIF over JPEG for this type of image. The JPEG file when compressed to this degree exhibits clear artifacting that degrades the image.
 9888 Bytes 9724 Bytes
GIF File
9 K in filesize
JPG File
9 K in filesize


DPI (dots per inch) - okay - I'm forced to talk about the most badly abused part of digital photos. As I previously noted, DPI has nothing to do with image quality. A photo, with the same pixel dimensions (i.e. 800 x 600) at 72 dpi is EXACTLY the same quality as that same pixel dimension photo at 300 dpi. Many photo programs refer to DPI with the misleading term of resolution. DPI is simply used by these programs to set the output to paper, in effect setting the output dimensions of the photo. So, a photo with dimensions of 800 x 600 at 200 dpi will print out as 4 inches by 3 inches. That same photo set at 100 dpi will print out as 8 inches by 6 inches. If these photo programs were to use the correct terminology, they would use PPI (pixels per inch) because this is what they are in fact setting. Your printer's output resolution (which is set independently of the photo) will determine DPI, which is really blended ink dots per inch.

Some programs also use DPI to resize an image. So, if you have a 600 x 400 pixel size image at 100 dpi and change the dpi to 300, the program will re-dimension your photo to 1800 x 1200 pixel. Be very careful with this since digital images don't respond well to being "blown up". You should get in the habit of always using pixels to re-dimension an image, not DPI.

DPI does have some relevance when scanning an image. In this case it does set resolution since it will determine the final pixel size of the image. A photo scanned at 300 dpi will be twice the pixel dimension of a photo scanned at 150 dpi. So, a 7 inch by 5 inch photo scanned at 150 dpi will end up as a 1050 x 750 pixel sized image. That same photo scanned at 300 dpi will end up as a 2100 x 1500 pixel sized image.

For more about DPI - see my short article - The Myth of DPI

Resizing Images - most image programs offer a resizing option allowing you to change the dimensions of a digital photo. Please note that while digital photos can be reduced in pixel dimensions with excellent results, they generally don't take well to being enlarged. So, most discussions of resizing will involve the shrinking of an image. When resizing, make sure that "maintain aspect ratio" (or "constrain proportions" in Adobe Photoshop) is selected (or that the width and height adjustment are tied together) and if offered, make sure that "antialiasing" is selected. Some programs recommend that optimal resizing is done in even factor amounts (i.e. 50%, 25%) - while other programs offer different types of resizing algorithms (bicubic, etc.). Test a few images to see what works best in the program that you are using.


EXAMPLE WORKFLOWS

A workflow is simply the process (the steps) of going from the original digital photo to the finished product.

Digital Camera:
  1. Take the photo at the highest quality the camera allows (largest size, smallest compression). For example, a 3.3 megapixel camera will generally produce a picture that is about 2000 x 1500 pixels in size. At the highest quality JPEG setting on the camera, this file will be about 2 Mb in filesize.
  2. Transfer the pictures from the camera to your computer (usually with software provided with the camera).
  3. Run your favourite image editing program (i.e. PhotoShop, PhotoPaint, Irfanview, Paint Shop Pro, PhotoImpact, etc.). This must be a program capable of resizing a photo. Load in (i.e. Open) the picture.
  4. Do a "Save As" on the photo into a lossless format (i.e. TIF, BMP, PNG) and use this file for editing. When you do the Save As, use a filename that means something - usually incorporating the file number of the original photo (i.e. NewboroLake2003-345-5436.tif - where 345-5436.jpg is the original filename). Note that this step will also prevent the accidental erasure (overwriting) of your original photo.
  5. Resize the photo down to about 800 pixels in width. The photo can be cropped first if you only want to send a portion of the photo. Resize the cropped portion to about 800 pixels.
  6. Apply any edits to the photo that you want - colour correction, etc. If you sharpen the photo, this should be the very last thing you do (the final edit to the photo).
  7. Use the "Save As" option of your program to save the file as a 20% compressed (80 quality factor, Adobe 8) JPG. The file should be in the 150 Kb filesize range.
  8. If you are just sending this photo by email for general interest, then compress it further - try a 50% compression and see how it looks.

Scanner:
  • Scan the original photo using a setting of 200 dpi - this will be sufficient "resolution" for almost all applications. If you are doing OCR (Optical Character Recognition), then scan at 300 dpi.
  • The scanner will either give you the option of saving an image file, or will bring the file directly into your image editing program. If the former, save the file in a lossless editing format such as TIF, BMP or PNG using a filename that will mean something to you. Run your favourite image editing program (i.e. PhotoShop, PhotoPaint, Irfanview, Paint Shop Pro, PhotoImpact, etc.). This must be a program capable of resizing a photo. Load in (i.e. Open) the picture.
  • Do a "Save As" on the photo, maintaining the lossless format (i.e. TIF, BMP, PNG) and use this file for editing. When you do the Save As, modify the filename so that you don't overwrite your original. If the original file was NewboroLake2003.tif then you might want to use something like NewboroLake2003-email.tif or NewboroLake2003-800.tif (I use this type of naming to indicate the final width of the photo).
  • Resize the photo down to about 800 pixels in width. The photo can be cropped first if you only want to send a portion of the photo. Resize the cropped portion to about 800 pixels.
  • Apply any edits to the photo that you want - colour correction, etc. If you sharpen the photo, this should be the very last thing you do (the final edit to the photo).
  • Use the "Save As" option of your program to save the file as a 20% compressed (80 quality factor, Adobe 8) JPG. The file should be in the 150 Kb filesize range.
  • If you are just sending this photo by email for general interest, then compress it further - try a 50% compression and see how it looks.


A Word About Sharpening

Almost all digital photos require sharpening, particularly if they have been resized. The professional technique is to shoot digital photos with no in-camera sharpening applied, in fact many pros will use the RAW setting of their digital camera simply to record what the camera's sensor sees (with no post processing). They will then do all their post processing in a high end digital imaging program such as PhotoShop. They will generally sharpen up to 3 times, once right out of the camera (if shot in RAW mode), a second time at the end of the digital editing process to give the photo perfect "on-screen" sharpness and a third time for printed output (matching sharpness to the size and type of media used).

Most amateurs have the camera or scanner apply some sharpening so that the photos can be used "right out of the box" (in fact most consumer grade digital cameras do quite a bit of in-camera sharpening). But most will still benefit from additional sharpening and if you resize a photo, re-sharpening is a must.

Sharpening comes in many flavours and sometimes it can be a bit hard to find in a program. For instance, in Adobe PhotoShop (CS or Elements), the most effective sharpening tool is the "Unsharp Mask" that you will find under the "Filter" menu using the "Sharpen" option. In PhotoImpact it is under the "Effect" menu as the "Blur & Sharpen" option. Again the "Unsharp Mask" provides the most control. In IrfanView it is under the "Image" menu but you'll have to open the "Effect" option and choose "Effects Browser" to control the amount of sharpening. In Corel PhotoPaint it is under the "Effects" menu as the "Sharpen" option. The "Adaptive Unsharp" options works very well as does the "Unsharp Mask".

What do I use? With my digital SLR I generally use a program called CSPro. I also use a program called Nik Sharpener that allows for a fine degree of control of sharpening depending on the desired output (Internet or print, large or small). I'm also looking at PhotoKit Sharpener, perhaps the best sharpener on the market today.


WHAT I WOULD LIKE TO RECEIVE

You'll have to know two things. The first is how to re-dimension your original photo. Make sure that in whatever program you use, you are dimensioning using "pixels." In Adobe PhotoShop this is found under Image menu as the item "Image Size." ("Resize > Image Size" in Elements). In Ulead PhotoImpact it is found under Format menu as the item "Dimensions.". In Irfanview it is found under the Image menu as "Resize/Resample". In Corel PhotoPaint it is found under the Image menu as the item "Resample."

The second is to to use the "Save As" option under the File menu to save your image as a JPEG (JPG) file. Many programs provide the JPEG compression option at the point of save (sometimes with an OPTION button on the dialog box). Other program require you to go into an OPTIONS or PROPERTIES setting and set the default JPEG compression you want to use. Many of these program will use a default compression of 25% (quality factor 75 - Adobe Quality 8), which is fine for most applications.

For posting to a website: A JPEG photo with the longest dimension (horizontally or vertically) of 800 pixels, saved with 20% compression (Adobe quality 8). A typical 800 x 600 sized colour photo will be about 150 kb in size at this size and compression. If your photo is greater than 200 kb in size, you've done it wrong. I would also prefer if the photo was not sharpened after resizing, I would prefer to do that myself. For most web postings the photo will end up as 600 pixels in width or less at a compression level approaching 50%. An 800 pixel original, with low compression provides plenty of editing data.

A "Just to See" Photo: A JPEG photo with the longest dimension (horizontally or vertically) of 600 pixels, saved with 30% compression (Adobe quality 7). A typical 600 x 400 sized colour photo will be about 100 kb in size at this size and compression. If your photo is greater than 100 kb in size, you've done it wrong. Feel free to sharpen.

A Photo for use in a Print Publication: Contact me first. In almost all cases a JPEG file (as opposed to TIF) is preferred. Divide your photo by 200 ppi (which is print photographic quality) to see what pixel dimensions it should be. For example, if the photo is intended to fill a 6 inch wide by 4 inch high space, then a 1200 x 800 pixel dimension JPEG at 10% compression (Adobe quality 9) will be ideal. I would prefer an unsharpened copy.

A Photo for Genealogical Archiving: Contact me first. In this case I probably do want the highest quality possible. This could be a minimal compressed JPEG (Adobe quality 10) at the largest pixel size available (i.e. original dimensions of the digital photo - no resampling) or a TIF or BMP file. Ideally such photos would be sent to me by postal mail on a CDROM rather than by email. But, I will take such photos by email if they are of special interest. A post-processed photo is fine, but if you can also include the original unprocessed photo or scan, that would be great.


A Note to ADVANCED USERS
Any photo used for Internet applications should be saved in RGB colour space (best is sRGB for Internet use). This is the default of most programs, however some working with offset printers will have their photos in CMYK colour space. The problem with this is that CMYK JPEG (or TIF) files are much larger than their equivalent RGB version - and the extra data is not needed. So, reduce the bloat and convert your files to RGB (either 24 or 32) before sending.

If you are philosophically hung up on not using JPEG because it is a lossy format, then send me the photo in JPEG 2000 format, which is lossless at 0 compression, but much smaller than an equivalent TIF file.

A few Links of Interest:
A handy tool for determining the compression factor of a JPEG is a little freeware program called JpgQ. Have a look at the JPEG Quality Estimator (follow the link on that page to JpgQ - JPEG Quality Estimator).
Email Comments: send me email: Ken Watson

URL: www.rideau-info.com/canal/photos/index.html
© 2003-2012 Ken W. Watson