Issue #8 June 2005

Sharing photographs online

Introduction

Digital photographs are everywhere. Digital cameras, mobile phones with built-in cameras, and scanners all readily available and convenient for taking pictures. Additionally, sophisticated digital cameras are becoming more affordable. Although people still take pictures on film cameras and scan in the results of developing the film, with digital cameras you can see these results immediately and decide whether you want to keep the picture or take a better one.

It is so convenient to take pictures on digital cameras that (it has been argued) we are all becoming better photographers: we take more pictures and therefore are able to choose only the best for printing and sharing. It is easy to experiment, see the results quickly, and share them with friends. The Internet makes sharing photographs very simple and a lot of fun.

File formats, sizes, and resolutions

There are several file formats used for representing images. The most common is JPEG, which is a lossy format. That means the image fidelity is traded off against file size. The result is that JPEG files can be relatively small, even for high-resolution images. The size of the file will depend on the amount of detail in the image.

There are other image file formats such as PNG and GIF that are "non-lossy," meaning that absolute fidelity to the original image is guaranteed—but the file size might be larger as a result.

For sharing photographs with people who want to view them online, the best format to use is JPEG. A high-quality JPEG image can look just as good to the naked eye as the original image. In fact, digital cameras commonly store the pictures taken in JPEG format. The quality of the JPEG can be adjusted by a menu setting on the camera. The higher the quality, the less lossy the JPEG compression and the larger the resulting file.

Another thing to consider is the resolution of the image, or in other words, how many pixels wide and high it is. For online sharing, the resolution often determines how large the image appears on the screen, so it is worth thinking about how many pixels an average display can show. Although screen resolutions such as 1600x1200 are possible with very many graphics cards, 1024x768 is quite a common choice.

To make sure that a photograph will fit on someone's screen, it is a good idea to scale it down so that its longest edge is (say) 700 pixels. This is just a guideline, of course.

Depending on how you are going to share your photographs, this scaling-down step may be done for you. It is important to remember that if you require prints from your image, the higher the resolution the better the resulting print quality will be. You may wish to save a copy of the original unscaled image for this purpose.

The file format and resolution of an image can be changed using The GIMP. After starting The GIMP and loading the image, scale the image to the size you would like by selecting Image -> Scale Image... from the menu. See Figure 1, “Scale image using The GIMP”. When you type in the number of pixels for the width and press Enter, the height is automatically adjusted proportionally. Conversely, if you enter the height first, the is updated proportionally. Set the interpolation to Cubic (Best), and then press the Scale button.

Scale image using The GIMP
Figure 1. Scale image using The GIMP

Now that the image is the correct width and height, the next step is to save it. To save in JPEG format, select File -> Save as... from the menu, then choose a file name, making sure to end it with ".jpg". When you click Save, a new dialog box will appear with a Quality slider bar and a Preview checkbox (see Figure 2, “Save JPEG using The GIMP”). To see the effect of altering the quality of the JPEG compression, select the Preview checkbox. In the image window, select View -> Zoom... -> 1:1 from the menu. When you drag the Quality slider up or down (and release it) the file size shown in the dialog box will be updated and the image window will reflect the quality setting.

Save JPEG using The GIMP
Figure 2. Save JPEG using The GIMP

A good rule of thumb is to make sure that the file size is no larger than about 150KB–200KB. The trick is to balance good image quality against small file size. The places in the image where low quality really becomes apparent are areas with strongly contrasting colors such as a tree branch against a bright sky or writing on a street sign. See Figure 3, “JPEG quality: 70 (left) and 95 (right)” for a magnified example of the effect of the Quality setting.

JPEG quality: 70 (left) and 95 (right)
Figure 3. JPEG quality: 70 (left) and 95 (right)

Methods of sharing

PhotoBox

Paper prints from digital photographs can be obtained from some online companies such as PhotoBox (based in the UK). Once you have registered with them to get an account, you are given access to a storage area into which you can upload digital photographs. You can then add those pictures to your online basket at the size you prefer (6"x4", 7"x5", etc.), and the printed pictures are sent to you by mail. With PhotoBox, each time you order a set of prints you are allocated more storage space.

You can organize photographs into albums and allow other people (either selected account holders or the general public) to view them or even order prints for themselves. Remember though: prints from scaled down images will not look as good as those from the originals.

deviantArt

If you like to go a little further than taking snapshots and instead are aiming to improve your photographic skills, an online art community such as deviantArt might be a good place to share photographs.

Account registration is free, although a monthly subscription fee is required to use some of the more advanced features.

When uploading a photograph, you choose which category it fits into. Actually the website is not just for photographs but also drawings, paintings, and art in many forms, but the "Photography" category is organized into several sub-categories such as architecture, portraits, and nature.

The pictures you upload are available for everyone to view and comment on. If you wish, you can also invite advanced critique. If the picture is especially good it might even be added to someone's "favorites" list.

An online art community is a good forum for encouraging you to develop your photographic skills more creatively. Many offer the opportunity to see which photographs are most popular, which can be both exciting and instructive.

Your own hosting

If you are knowledgeable enough to host your own website, or have a friend who is, you can of course display your photographs there.

There are plenty of open source web applications for creating photograph galleries. The one I use is a PHP application called Gallery. It is relatively simple to set up and easy to use.

The Gallery documentation describes how to install the software on your web hosting server. Once you have done that, you can configure Gallery using a web browser. There are lots of different settings, but only a few of them need to be changed (such as the administration password) before you can start adding pictures.

Photographs are organized into albums and visitors can comment on each picture. It is possible to configure Gallery to allow visitors to order prints, using the services of several different online photographic suppliers.

If you decide to use Gallery to display your photographs, make sure you subscribe to the gallery-announce mailing list. That way you can find out about any security updates needed.

Quick steps

Here is a reminder of the steps for converting an image to a scaled-down JPEG using The GIMP.

  1. Images -> Scale Image...
  2. Set size and click Scale
  3. File -> Save As...
  4. Choose a file name ending in ".jpg" and click Save
  5. Select the Preview checkbox and move the Quality
  6. When quality is acceptable and file size is small enough, click Save

So get snapping and enjoy sharing your photographs!

Further reading

  • PhotoBox—an online digital prints shop
  • deviantArt—an online artwork sharing community
  • Gallery—for your own photograph hosting

About the author

Tim Waugh is a Systems Engineer at Red Hat, primarily responsible for scanning/printing, DocBook, VNC, and some shell utilities. He has been using Linux since 1995. He lives with his wife in Surrey (England).