I know that TIFFs are supposed to save all the information in a picture, but can anyone tell me in baby English why, if I save a jpg as a TIFF without changing it, it immediately takes up 20 times as much space? Is it just cyber-bureaucracy??
Because tiff files are not compressed as well as jpegs. Formats like jpegs are compressed like zip files. As you might know computer language is made up of one's and zeros and this includes picture files..
A picture with no compression could be RAW or BMP (bitmap)and perhaps tiff (there might be some others too).
This is a over simplified example but say you bmp file is made up of ones and zeros that look like this.
111100011100000 (there would actually be a LOT more numbers.)
A jpeg might compress it like this. 41303150
So the compression says 4 ones, 3 zeros, three ones, five zeros.
When you computer reads the jpeg file, it knows how to uncompress the file and display it to you.
As I said an over simplified example Jpeg does a better job on compressing than tiff. Sometimes a tiff is not compressed at all.
There are people out there a lot smarter than me that are constantly figuring out new compression algorithms. Some day (if it has not happened already) someone will figure out a way to compress smaller than jpeg and that will be the type of file everyone uses.
Compression can sometimes be bad because lose of detail during compression. Different compression algorithms may yield different amounts of loss.
True photographers will take their pictures using RAW and have software that will allow them to edit the RAW images.
Posts: 589 | Location: Pittsburgh, PA U.S.A. | Registered: 16 December 2005
When a TIFF is created, you can choose which type of compression you want (lzw, zip, etc.). Different compression techniques will work better on different kinds of images (i.e., amount of detail and color in the image). TIFF compression is lossless - when you uncompress, you get back exactly the same image you started with.
JPEG compression is not lossless - some detail in the picture is thrown away during compression, so when you uncompress the file what you get back is not the same as what you started with. The differences are usually very small, but not always. Throwing away some of the less noticeable image data is what helps to make it a smaller file than using other methods.
Saving a JPEG, then opening it, saving it as a new file, opening the new file and saving it anew once more, etc., etc. - this process will gradually deteriorate the image more and more.
Posts: 351 | Location: Northern VA | Registered: 13 October 2004
Thank you both for your interesting replies. Spinnaker, you have given me for the first time a tiny idea of how it works.
Bottegal, I was going to ask some more questions about the various TIFF choices, but I a have been googling some of the terms and can see that I need to do more reading instead of just being dismayed at my diminishing drive space.
I know enough to try to make all my changes in a jpg at once, and then, if the image is important to me, to save it as a no-compression TIFF. I have assumed that that also allows me to go back and make other changes if I want to without deteriorating the image. Is that correct?
With my old camera (Olympus 5050) it didn't seem to matter much, but with the Fuji Finepix I got in Ravello when the 5050 broke, detail seems to be lost much more easily. The Fuji is very handy because of its size, but I certainly am looking forward to getting the Olympus repaired!
There isn't much point in saving a file as TIFF. Once you have edited the file and saved it as a jpg then simply viewing the file without saving it back will not degrade the file any further.
Thanks, CDT - That's a really interesting site. My favorite unsuspected tidbits so far are that it doesn't matter if you edit and save a JPEG more than once as long as you don't close it in between, and that you may incur some loss of quality by using the SAVE AS function, which I always thought was noninvasive.
I will be investigating the other formats later. As to saving my favorite images as TIFFS once I have opened then (for the first time) as JPEGS and edited them (for the first time), wouldn't that still be better than saving them back as JPEGs? Has it been degraded just by being saved in the camera as a JPEG and having been opened on the computer?
Dorothy - a very good question. If I'm downloading JPG pictures from my digital camera, I always save the important ones to CD-R. By doing that I keep a secure archive and can still view the copies on my computer, knowing that the originals won't degrade.
I also do a lot of scanning for work, and always keep the original TIFF files. Since they do take a lot of space, I normally produce JPG versions as working copies with the same file number (ie., 100_1234.TIFF = SAVE AS = 100_1234.JPG). I also keep a catalogue where I enter basic information about each picture - date and location.
People forget that when you transfer files from one computer to another, they don't always keep their "Date created" data. One way around this is to allow the camera to imprint the date, but that can't really be removed afterwards and spoils the picture in my opinion.
The degradation only happens when the compression is performed and that is on the save operation.
It soon wont matter, last June Seagate announced a 3.5" disk holding a terabyte of data (1000GBytes) and costing $400. Hitatchi and IBM also have products of this size. The price will soon drop, I have already seen them on ebay in the US for less than $300.
Originally posted by Dorothyk: Thanks, CDT - That's a really interesting site. My favorite unsuspected tidbits so far are that it doesn't matter if you edit and save a JPEG more than once as long as you don't close it in between, and that you may incur some loss of quality by using the SAVE AS function, which I always thought was noninvasive.
I will be investigating the other formats later. As to saving my favorite images as TIFFS once I have opened then (for the first time) as JPEGS and edited them (for the first time), wouldn't that still be better than saving them back as JPEGs? Has it been degraded just by being saved in the camera as a JPEG and having been opened on the computer?
quote:
Originally posted by CDT: The degradation only happens when the compression is performed and that is on the save operation.
We've got some really basic confusion here, including some from spinnaker. First, JPEG and TIFF and "raw" are different file formats. Kind of like languages, or the differences between Word and Excel. Each of these formats records basic information --the colors of the pixels comprising the picture-- in a different code. When you open a file in an image editor, for example Adobe Photoshop, the code for JPEG or TIFF or "raw" is translated into the code used by Photoshop. So while you're working in Photoshop, and saving in Photoshop, the file is a Photoshop file. Similarly a Graphic Converter file, if that's your editor of choice. It's existing in the RAM of your computer, and probably being written into and out of a hidden cache on your harddrive, as a file written in the code used by your editor program.
You can then Save As TIFF, or JPEG, or for that matter, Photoshop. (In Windows and Mac OS 10, you'll then get a dot-extension appended to the file: .tif or .jpg or .psd, indicating the format of the file.) The file has been converted to the code for whichever "format" or "language" you've chosen. If you open it again in some editor, it gets converted again, just like before, you munge it around in your editor's code, and then Save As the format you choose. Over and over. OK?
Now a little digression on compression. spinnaker is partially correct, in saying that compression is applied by writing yet another kind of code. But spin's example is of a lossLESS compression code. This would be like what LZW or ZIP does: merely substitute a shorter version of the code, using less characters to write the same information, thereby making it a shorter, smaller file. Which takes up less storage space on a harddrive or CD or DVD. OK, so far, so good.
But alas, that's not how JPEG works. JPEG uses a very special kind of coding that changes the information recorded in your file. It a lossY, not a lossless, format. In really simple terms, JPEG looks at adjacent pixels, and if it finds two or more that are similar, it creates an "average" color for the two.
You know about pixels, right? That your camera, or scanner, has an array of teeny little light sensitive lenses, and records an image as a grid of squares, like a sheet of old fashioned graph paper, or maybe a chess or checkers board. If you zoom in while editing, you can see these squares, or pixels. Well, imagine that you've taken a picture of someone's face. A pretty good closeup, so that you could see, say, strands of hair loose across their forehead. At some point in the picture, one of those strands is going to cross a pixel. (Of course, all their hair is going to, but zoom in on one strand!)
Does the strand completely cover the area of the picture defined by that pixel? If you've used a low resolution to take your picture, maybe. In that case, the pixel is hair colored! But what if, by a more likely coincidence, only the edge of the strand ran across the pixel, so that your camera had to decide: hair or skin color? Your camera would make an average between the two colors. Now, just as a little thought experiment, divide that pixel into nine sub-pixels, like a tic-tac-toe diagram. You could now have, say, an upper left, a center, and a lower right sub-pixel colored like hair, with the others being skin color. Whoa, higher resolution, more "detail"!
Hence the quest for more megapixels in cameras, right? But, obviously, larger files. If the code has to record more pixels, it has to have more code! Instead of reading: pixel#2006=Red123Green104Blue004, it has to read: pixel#2006=Red123Green104Blue124pixel#2007=Red123Green104Blue004pixel #2008=Red123Green104Blue004pixel#2009=Red123Green104Blue004 blah blah blah for nine, not one, pixels.
Now, back to JPEGs... As has been noted, there are ways to compress files without losing information. But technically, all of them are proprietary, copyrighted and patented. Publishers of image editors have to pay for the privilege of including those methods in the programs. so a while back, a bunch of industry muckerty mucks got together the Joint Photographics Experts Group and said, "We're going to write a compression code that everyone can use more or less for free." An agreed upon standard method, to supposedly replace the PNGs, GIFFs, LZWs and all the other compressions. And for some unknown reason, they decided the best way to compress pictures was to mungle the pixels together. Really.
JPEGs are pretty sophisticated, but at base what they do is lower your resolution. Think back to our example above. The area we had first as one, then as nine pixels, might have some pixels that were similar. If it was all blue sky, instead of a portrait, all nine pixels would be the same color. So it might not hurt to say, pixels#2006-8,3006-8,4006-8=Red123Green104Blue004, if indeed all those pixels were the same, or so similar a color you couldn't tell them apart when zoomed in. Or if you didn't care that they had been made the same: it's only blue sky in the background. Or if, for one version of the photo going on a web page as a tiny thumbnail, the original nine pixels would be so teeny they functioned as one.
Even in our example of hair, the nine-pixel area has three pixels hair colored, and six skin colored, right? So that can work. IF the skin tones are all similar, and if the amount of JPEG compression you specify allows that fine a discrimination. But if you tell the JPEG algorithms to really compress the picture a lot, well, it might just haveto to create a clump of similarly colored pixels in that area.
In real life, the JPEG method has a lot of decision making power. There are all kinds of rules worked out by the experts for which kinds of colors can be conflated according to how well people can discriminate between them in the first place, and whether there might be large areas (such as sky or walls) in which to concentrate compression. Edges between color areas are supposed to be respected more, blah blah blah. But the upshot is, JPEG compression changes colors. And in doing so, it takes the risk of losing detail, or shifting colors. Hence, it is lossy. Always, Period The End.
That's why spinnaker is kind of right in saying "True photographers will take their pictures using RAW and have software that will allow them to edit the RAW images." All cameras "take" pictures as "raw." All cameras use some proprietary --"raw"-- software to record the image. Every manufacturer uses a different "raw" format. Some cameras will allow you to save the picture in this format. Some only allow you save as JPEG, some add TIFF. Some image editors have plugins that allow them to read the "raw" format of some cameras. Adobe proposed a standard RAW format a couple of years ago, but you can imagine that manufacturers who've spent jillions of bucks writing their own "raw" formats and having hardware built to run it aren't happy about spending jillions more to change. I think maybe Pentax has adopted the Adobe RAW.
So if you could use your camera's raw, you would avoid the inevitable loss incurred by saving, in camera, as JPEG. But so could you by using TIFF in camera. (Although some people claim TIFF has its own color shifting problems!) And you'll experience less loss of information by taking and saving at your camera's highest resolution, no matter what format you Save in. It's a little confusing when CDT says, "The degradation only happens when the compression is performed and that is on the save operation." No compression related degradation will occur when saving a Photoshop (or Graphic Converter, or iPhoto) file as a native file. You can do that a million times: open and edit and Save and close and open and edit and Save the file in an editor. The degradation occurs when you save the file as a JPEG.
In the meantime, the TIFF or Photoshop file may indeed be 20 times the size of a JPEG version, because it is not compressed!
Finally, is this relevant to you? If you need to make 24" glicee art prints, worry about it. If what you're going to do is put pictures on web pages and in photo albums, just use high res to begin with, and edit your pictures as little as possible.
If you really think you have to have multiple editing sessions, you can open the TIFF or JPEG saved in your camera in your editor, then temporarily Save As an editor file (Photoshop, iPhoto, whatever.) Open and close and Save the editor file until you are finished. Then if disk space is really at a premium, Save As a JPEG and discard the editor file. But as CDT says, with CDs and DVDs so cheap, just make backups immediately, and store pictures on those media, not on your hard drive. (And I say, make two CD or DVD copies. Even those media can be damaged.)
Any questions?
This message has been edited. Last edited by: Marta,
Thanks! Bucky "Trying To Slow Down" Edgett
Posts: 750 | Location: Maryland | Registered: 24 April 2006
Sorry it took me a few days to get back - part lapse & part digesting this very interesting information. It does help to explain some problems I've run up against, and I'm also encouraged to know that new space options are likely to be affordably available in the "foreseeable future."
Thank you all so much for your painstaking explanations! I can imagine how hard it must be to make these things comprehensible in everyday terms.