Forgotten in its old age

by Aditya

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

If I edit an image file using some application like Gimp, Photoshop or MSPaint, while saving I will be asked to select the required file-format. There are different formats available, the common ones are jpg, png and bmp. Other less common options are gif and tiff.

So which option should I select? What are the merits and demerits of using a particular file format?

share|improve this question

4 Answers 4

up vote 6 down vote accepted

JPEG is lossy, which means it compresses the image (in part) by discarding data. The data it discards is (normally) chosen to minimize the affect on the quality of the image, but it (virtually) always loses at least a little quality -- and depending on the quality level you choose, it can lose quite a bit. For most photographs it should be considered a display-only format -- once you've converted something to JPEG, you don't want to do any more editing on it. If you need to make changes, you re-start from some other format, make the changes, and do another JPEG conversion.

GIF uses only lossless compression, but is limited to 8-bit (256) colors, which is quite limiting for photographs.

PNG was designed as a replacement for GIF, and mostly succeeds. It supports 24-bit color (8 bits each for red, green, and blue) and uses lossless compression.

TIFF is really a container format that allows you to insert various kinds of data into the container. While it's used primarily for images, it's really almost like a file system, so you could theoretically use it for almost any kind of data. This has a couple of consequences. One is that even if a program supports TIFF files, it may not support all TIFF files -- e.g., many don't support LZW-compressed images. In fact, few programs support all possible TIFF files. Another consequence is that TIFF tends to have a fair amount of overhead, and writing code to support TIFF (at all well) is a pain (which is why so many programs support it only incompletely).

BMP is basically just a Windows device independent bitmap written out to disk. It has only extremely limited support for compression (and most BMPs aren't compressed at all). Programs written for Windows can read/write BMP really easily, but there's not much else to recommend it (in particular, BMP files tend to be quite large for the amount of data being stored).

Conclusion: JPEG is useful as an output format (e.g., to display things on web pages it's good because it's compact, and virtually everybody can read it).

As an intermediate format that you might use (for example) to store a file that might later be edited, TIFF is about the only one of these that's really of much use.

The others (GIF, PNG, BMP) aren't really of much use for photographs.

share|improve this answer
2  
PNG actually supports 32bits, as it also supports 8 bits of alpha channel. Not that important for storing complete photographs, but if for example generating an image to be used on a web page, then the 8bit alpha channel could be really important. –  Pete Jun 11 '11 at 10:05

In general, I would say you probably want to save to a format that supports metadata unless you have a compelling reason to do otherwise. In that regard, jpeg and tiff are the two most common formats for photography outside of RAW+XMP or DNG.

I have used PNG in some of my online portfolios, as I've taken to rounding the corners of my scaled-down images for nicer exhibition and to do something to set my work apart from everyone elses. The down side of this is that PNG does not support metadata. This has limited me in a lot of respects, as most of the better online photo sites support automatic metadata extraction and display (i.e. Flickr).

To be more explicit...when exhibiting downscaled versions of your art online, such as on Flickr, DeviantArt, 1x, RedBubble, etc...it is probably best to use JPEG as your final output format. These files are good quality but very compact, and do support metadata. For long-term storage of originals, I would recommend RAW+XMP, DNG, or TIFF, as all of those formats do lossless compression and also keep metadata. TIFF might be the best choice for you if you are using Gimp. I have used RAW+XMP myself, as I like having my original raw files...but I have also considered converting everything to DNG to simplify file management.

share|improve this answer

If using Photoshop or Gimp save as PSD file.

Save to JPG in order to upload photos to the web.

share|improve this answer
    
    
Welcome to PhotoSE. I would check out that thread linked by @mattdm. The PSD format is really starting to fall behind as a useful, interchangeable format, and a lot of people recognize that fact. To avoid down votes, you might either want to rework your answer, or delete, to save yourself some lost rep. –  jrista Jun 8 '11 at 22:33
    
Or, explain why you disagree. :) –  mattdm Jun 8 '11 at 23:21
    
I have read the thread already and I disagree. –  Boris Jun 9 '11 at 2:08
    
Cool. Adding some more explanation here would be helpful too. –  mattdm Jun 9 '11 at 12:48

I save my edited images as TIFF with LZW compression. I use the Gimp to edit and I have scripts based on ImageMagick that convert the TIFFs to JPGs of various sizes and quality levels for web use, printing, etc. I expect PNG would also work; I chose between them choice several years ago and I've forgotten why I picked TIFF. (Maybe it was the metadata issue other responders have mentioned, or perhaps ufraw's PNG output was too slow.)

When I want to preserve layers for future editing, I save as .xcf.gz (Gimp's native format with gzip compression). Of course, if you use programs besides Gimp, that may not be helpful.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.