OK, don't be mad at me -- JPEG or TIFF?

Keep this forum to positive questions.

Moderators: gcrogers, Kevgermany, Costas L

OK, don't be mad at me -- JPEG or TIFF?

Postby Chris26 » Sat Aug 18, 2007 6:41 pm

Yes I know you are probably fed up with this, and I posed this question some time ago but I was after some information and have just found what I was looking for. Question is? What do you guys think.

Saving a finally edited image for export say to a mac then print from someone elses compute? well I have just read the following, (I know you can use PICT, but this is out of the equation for now):

"...jpeg IS BEST USED WHEN COMPRESSING CONTINUOUS-TONE IMAGES (IMAGES WHERE THERE ARE GRADUAL CHANGES BETWEEN COLOURED PIXELS)...ANY IMAGE THAT INCLUDES GRADUAL COLOUR TRANSITIONS QUALIFIES FOR jpeg..jpeg IS NOT THE BEST CHOICE FOR LINE WORK AND HIGH CONTRAST IMAGES...THESE ARE BETTER SERVED BY tiff"

Any comments?

ALSO - As I understand this, or don't as the case may be, why would I want to lose colour image information by converting my 32 bit edited photo into a 24 bit jpeg when I can save it as a 32 bit TIFF? Some of my photos have very subtle colour gradations (mostly my fine art ones) and I naturally want to retain MAXIMUM colour information on its way to another computer (not via email of course) And I am sure that someone said that JPEG is only storing 8 bit, which if trueseems highly undesirable. Ok so none of this is a problem for an A4, but I will be doing A3 and people will not be stepping back to admire, they will want to get closer. (That's the idea anyway)

Am I seriously misunderstanding something here or is this a sensible question??

Thankyou folks

Best regards to you all.

Chris.
Chris26
 
Posts: 46
Joined: Tue Jul 24, 2007 10:09 pm
Location: Rep of Ireland

Postby lnbolch » Sat Aug 18, 2007 8:20 pm

It is a good question, because it is so often asked. To answer it, one needs to understand the nature of the file formats.

First, 24-bit images are 8-bits per channel. Red, green and blue are represented by 256 steps of lightness from none at all to total lightness. Now, a lot of processing is done in 48-bit workspace allowing 16-bits per channel. This provides 0 to 65536 steps. At this time in history, though the image may be processed as 16-bits per channel, it can only be viewed as 8-bits per channel in most cases.

TIFF can be compressed a bit when saved, but the savings are generally quite small. When saved, there is no loss of quality, and bit depths beyond 8-bits per channel (24-bits) are supported.

The great strength of JPEG is the flexibility of its compression. This is often controlled by a scale of 1 to 100, but there is no standard. In Photoshop, Save As... gives only 12 steps, while Save For Web... provides the whole 100.

When you save a JPEG some very sophisticated analysis takes place, calculating how to best compress it. At the lowest compression/highest quality, it looks only for redundant information which it discards. When opened again, the JPEG loader in your program is smart enough to understand this and restores everything. At higher levels of compression, it begins to look for clumps of pixels of the same colour, so each clump can be represented by a single set of values. A picture with a large white wall, may be represented by a couple dozen values instead of thousands. Again the loader restores the missing information. At high levels of compression, clumps of pixels will be grouped together, and artifacts may become quite visible. At this point, the loader does its best, filling out every pixel with colour values, but the original quality is forever lost.

So While TIFF is ALWAYS the whole value of the original image, JPEG may or may not be to a continuously varying degree. At maximum quality, JPEG handles lines, type and the like very well. At maximum compression, it really looks aweful. The artifacts of high compression are first seen along contrasty edges. Both TIFF and JPEG handle gradients very well, and at the highest quality setting, JPEG and TIFF images appear identical. Depending upon content, however, the JPEG image file will be considerably smaller. Try it yourself and see.

If one needs both a small file size and clear type and lines, PNG is an excellent choice. Though not widely used, it is widely supported. It has a further advantage of being able to support transparency.

Referring to your final question, when you process in 32-bit, all colour information is actually just 24 bit. You still just have 8-bits per channel, with a red, green, blue and an alpha channel that supports transparency. There is no loss going from 32-bit to a 24-bit file for delivery. The alpha channel is used when compositing images together. Nothing whatever to worry about here.

Going from 16-bits per channel (48-bit) to 8-bits per channel means a whole lot of mathematics, and colour precision is lost through rounding errors as 65536 x 3 steps are reduced to 256 x3 steps. In cases like photographs, this would not be noticed, but in something like a corporate logo where a spot colour is critical, it could well be off just a bit. This is the whole basis of the Pantone colour system where specific colours are absolute.

At this point, there is only one monitor I know of, that attempts to support 48-bit colour directly. Printers might, but then they might not. I do not have to convert to 24-bit when I print my images, but the driver may well do so. Only those who write printer drivers actually know what takes place.

I realize this is a lot of material - bit depths, alpha channels, image compression and so on, but each of these are factors in understanding in order to find the answers to your questions. TIFF is always safe, but uses up a bunch of disk space. JPEG is incredbily versatile, but the process needs to be understood. PNG is an extremely useful and relatively new format, largely aimed at web-work. All the illustrations in the tutorials on my web-site are done with PNG since they contain both lettering and continuous tone information. I also use the transparency channel in PNG to overlay titles over action in my multimedia and movie work. On the PC side, one also sees BMP files with some frequency. They like TIFF are uncompressed, but the format lacks some of TIFF's more exotic features.

Every image processing program handles JPEGs, since there are probably more of them in the world, than all others combined. Whatever program or programs you use, take the time to play around with the various levels and see for yourself where visible quality begins to decline and thus set your own baseline.
User avatar
lnbolch
 
Posts: 919
Joined: Mon Mar 13, 2006 10:16 pm
Location: Edmonton, Alberta Canada

Re: OK, don't be mad at me -- JPEG or TIFF?

Postby Kevgermany » Sun Aug 19, 2007 5:52 am

Chris26 wrote:"...jpeg IS BEST USED WHEN COMPRESSING CONTINUOUS-TONE IMAGES (IMAGES WHERE THERE ARE GRADUAL CHANGES BETWEEN COLOURED PIXELS)...ANY IMAGE THAT INCLUDES GRADUAL COLOUR TRANSITIONS QUALIFIES FOR jpeg..jpeg IS NOT THE BEST CHOICE FOR LINE WORK AND HIGH CONTRAST IMAGES...THESE ARE BETTER SERVED BY tiff"

Any comments?


Larry's covered the pros and cons really well. To add I guess this comment comes from the visibility of jpeg artiefacts/jaggies along lines/edges, which'll be very obvious in line art.

However I'd challenge the statement saying that it's good for continuous tone images. as it can introduce artefacts/posterisation in smooth tonal areas, although this isn't generally the case.

An acceptable compromise may be to shoot/work in tiff, then convert to low compression/high quality jpegs afterwards for storage.

Currently the printer drivers in Windows are limited to 8bits/channel, so ALL output gets downgraded to this when printing (there's one Canon high end/professional exception). I've seen a couple of reports that higher bit depth printing is on t's way, but I think it's a long way off, even when it arrives, the printers need to become available, and I think that the differences will be small in most cases when compared to exsting 8bit printing. The eye just can't distinguish so many colours in an image.
Kev

Man is limited by his fears, not by his imagination.
Kevgermany
Site Admin
 
Posts: 5269
Joined: Fri Feb 25, 2005 9:11 pm
Location: near Munich, Germany

Bit depth then?

Postby Chris26 » Sun Aug 19, 2007 5:38 pm

Larry and Kev, thankyou, especially for your time to respond in detail.

May I just ask, so that I fully understand this, as far as QUALITY OF COLOUR INFORMATION IS CONCERNED, whether I save to JPEG OR TIFF, (Lowest compression values with JPEG of course) there is no loss of colour information in either. You see, space is not a problem, if each photo was 100 MG/B that still would not matter, it is exporting to mac AND to print, I do not want to have to save two of everything, ie, one in JPEG/TIFF and one in PICT, but rather remain consisitent with either TIFF or JPEG. It was always this compression that bothered me. I will never save any photo under 100% quality in JPEG.

But as long as when I save the JPEG it retains the 24 bit info, because I notice that you do not have the option to change this, but in TIFF it gives you the option to save in ALL the bit depths, ie, 8-16-24-32.

Regards, Chris.
Chris26
 
Posts: 46
Joined: Tue Jul 24, 2007 10:09 pm
Location: Rep of Ireland

Postby lnbolch » Sun Aug 19, 2007 8:04 pm

Every step in traditional image processing is semi-destructive. Bit-depth is really only significant in processing, though many are happy as clams to process in 24-bit. Working in 48-bit workspace provides much finer steps across gradients, and specially when making profound corrections, the more robust image will survive better. However, for viewing, as Kevgermany says, we are still very much in a 24-bit world.

For a good scan or well balanced image from a digital camera where corrections are minor, bit-depth has little impact. While the image is being processed, it is simply data in RAM and has no file format. That comes when you save it. Saving it with TIFF or high-quality JPEG does not alter the colour information. The red, green and blue data for each pixel is written to the file. In the case of the JPEG, any redundant information that can be perfectly reconstructed when the image is opened is discarded, resulting in a much smaller file than the TIFF.

TIFF and JPEG are two of the most versatile formats, for totally different reasons. TIFF will save at almost every bit depth from black&white with no greys at all for faxes and optical character recognition all the way to 48-bit images. One can embed a JPEG thumbnail in a TIFF for fast viewing in some programs. It can also contain multiple images in a single file.

JPEG rules the Internet. Any picture on my site that I want to protect from use, I compress until I can begin to see artifacts. I restrict the size to 640 x 480 or less, so if anyone tries to further process it and print it at a size that can be useful, the artifacts will ruin it. The term "lossy" sends some people into a panic - which is completely unwarranted. It has generated a great deal of FUD(Fear, Uncertainty & Doubt). Compression makes many things possible - the songs we listen to with pocket players and computers, and the video we watch are compressed. The great power of the JPEG format is that you have total control of the amount of compression. For optimum quality with optimum size, Photoshop's Save for Web lets you designate the size of file you want, and it will figure the best way to compress the image to provide top quality at that size.

On the last magazine shoots of my career, a glossy, hi-tech Brit magazine specified that I submit JPEG. One of my long time friends and colleagues is a well known shooter in the USA, who also writes and shoots for a top photography magazine as a stringer. He has a booming trade in fine art photography. He shoots JPEGs exclusively. Sees no reason to bother learning to process RAW. JPEG can be of great quality - even with substantial compression.

I will never save any photo under 100% quality in JPEG.


Pay no attention to Internet FUD or even what I am writing here. Work with a typical file one day when things are a bit slack, and see for yourself. Try various levels of compression, and then use that to set your own baselines.

Above all trust your eyes. Much of the FUD comes from people who don't actually do photography, just draw conclusions from what they read. We are VISUAL artists. We work with actual images. We and our viewers can clearly see when quality diminishes. Theory is not always supported by practice. Test using content you actually work with, and trust your eyes. Only that which can be clearly seen, matters.
User avatar
lnbolch
 
Posts: 919
Joined: Mon Mar 13, 2006 10:16 pm
Location: Edmonton, Alberta Canada

Postby Ian » Sun Aug 19, 2007 8:16 pm

Chris

JPG compression is a lossy image format and TIFF is not.

JPG takes an image and splits it into 8 by 8 pixels segments and applys a compression algorithm to each segment.
Even at best quality, data is lost each time you save an image to JPG. This is why it is not a recomended format for image editing as the image would be degraded on each save/read. Also you cannot save image editing in layers.
Images can become very blocky if you use jpg between editing sessions for image saves.
see here for a more in depth description of jpg
http://www.scantips.com/basics9j.html
http://www.jmg-galleries.com/articles/jpeg_compression.html

TIFF can apply compression as either LZW or ZIP which do not loose any image detail.

If you are only going to move your file between platforms for printing then jpg may be ok as you will have only done one save.

Also most print drivers and printers only use 8bit(24bit) data - so again reducing the colour depth after all image manipulation has been done should not greatly effect your printed image.

I hope this has helped rather than confused
Ian :)
Ian
 
Posts: 167
Joined: Thu Sep 15, 2005 11:21 am
Location: Midlands UK

Postby Kevgermany » Sun Aug 19, 2007 8:34 pm

One other point here, which maybe should be in another post.

As far as photographic images are concerned:

8 bit tiff images contain one channel - brightness - they are mono/B&W. Same goes for 16bit images.

B&W images with toning (e.g. sepia) need to be saved as colour images, with the 3 colour channels.

I.e. the smallest useful bit depth is 24bits for colour. Photoshop, until recently, only worked in 24bit mode.

If you're interested in the maths, all operations on images are mathematical. For speed reasons these are carried out using integer arithmetic, which truncates instead of rounding. This introduces errors in the colours, particularly over multiple changes. The question, which Larry's asking, is can you see the changes in the final image (& if you can, are they important). The FUD Larry's referring cto comes from guys who can measure the differences, see some effects in histograms and then by inference the image is shot. In most (but not all) cases the image is fine.
Kev

Man is limited by his fears, not by his imagination.
Kevgermany
Site Admin
 
Posts: 5269
Joined: Fri Feb 25, 2005 9:11 pm
Location: near Munich, Germany

Bits and bytes then!

Postby Chris26 » Sun Aug 19, 2007 9:44 pm

Larry and Kev thanks, and Ian. That just about raps it up then. It really clears everything up. Thankyou.
Chris26
 
Posts: 46
Joined: Tue Jul 24, 2007 10:09 pm
Location: Rep of Ireland

Postby Kevgermany » Sun Aug 19, 2007 10:37 pm

Chris, just as you thought you'd tied this up.... (Chasing around the fora)

An example, courtesy of Greg Rogers:

Res is a little high, so just links

original jpg (by Greg):

www.kevsgallery.com/photoi/jeep_orig.jpg

Heavily modified, showing jpeg artefacts:

www.kevsgallery.com/photoi/jeep1.jpg

Compare the skies. The first thing you'll notice is the brick like result of the manipulation of the jpeg. Areas of like colours in the original jpeg were aggregated and reduced to single colours. The relatively fine jpg aggregation algorithms allow a mooth looking sky in the original. Although the sky in the orignal jpeg is smooth, manipulation has brought out the underlying blocks of the jpegs. Plenty of other areas where this is visible as well. THis wouldn't have been the case with a 16/48 bit tiff.

In case someone's wondering, there's been no addition of a brick texture.
Kev

Man is limited by his fears, not by his imagination.
Kevgermany
Site Admin
 
Posts: 5269
Joined: Fri Feb 25, 2005 9:11 pm
Location: near Munich, Germany

Postby Ian » Mon Aug 20, 2007 11:38 am

Great example Kev

The brick texture comes from the 8x8 pixel blocks that jpg splits the image for compression

Ian
Ian
 
Posts: 167
Joined: Thu Sep 15, 2005 11:21 am
Location: Midlands UK

Postby Kevgermany » Mon Aug 20, 2007 11:46 am

Ian wrote:Great example Kev

The brick texture comes from the 8x8 pixel blocks that jpg splits the image for compression

Ian


Yes, but they've come from large aggregations of theose blocks due to quantisation, look at the front right tyre, there's still a lot of detail there where the original has more detail and less smooth tone.
Kev

Man is limited by his fears, not by his imagination.
Kevgermany
Site Admin
 
Posts: 5269
Joined: Fri Feb 25, 2005 9:11 pm
Location: near Munich, Germany

Kev's Jeep! and more...

Postby Chris26 » Mon Aug 20, 2007 6:51 pm

Hallo Kev, UM? I see the first photo but the second is posterized. Well whatever it is, but I am sorry, although I see bricks I really do not understand what I am looking at. I was expecting two identical photos the second one slightly less good, so to speak.

Can you post the original of the second one? I might understand it better.

But back to TIFFs, Are we or am I cutting the rose to discover the smell?? One minute it seems as if there basically is no difference between JPEG and TIFF as far as OUTPUT on a PRINTER is concerned, then there apparantly is, then I read that a 24 bit has no advantage over 16 or 8 bit editing, I hasten to annoy you all, but I am becoming confused. I really understand the alpha channel bit with TIFF plus its lack of compression etc, but I am trying to discover if (I have millions of megabytes space) I am better archiving my photos ready for print in TIFF or JPEG. Colour Colour Colour is my worry, the subtlety of the changes in one colour through its shades into another for example. For example blue, to turquoise, to light blue to heavy blue shaded and smudged with rose and pink pixels. Ok I am going to far but this is the level of editing I am doing. Taking photos, altering and increasing the number of colours sometimes 10 fold from the original photo.

Guys, if I were doing a landscape, for example, I would be AUTOMATICALLY saving in native format and JPEG no questions asked.

Maybe you folks can understand where I am coming from, I am not knit picking the pixel population in the computer. More genuinely concerned about subtle loss of qualtiy in colour, (I mean==='I know it's there, I want it there, no one else may notice it missing, but I WANT IT THERE...' type of attitude with my particular photo);

By the way I do not at this moment have the opportunity to print, I do not have the printer yet. So I can not do anything, but it sure would help to be prepared that if there is something amiss in the photo I can rule out the way in which I exported it from my computer, ie 8. 16. 32 46. 92 bit, Tiff Jpeg La di da etc etc.

Hey guys, I do appreciate your input, I mean that.

Best wishes

Chris.
Chris26
 
Posts: 46
Joined: Tue Jul 24, 2007 10:09 pm
Location: Rep of Ireland

Postby Kevgermany » Mon Aug 20, 2007 8:15 pm

The first is the original of the second... This is heavy posterisation & I posted it just to illustrate, I'd never expect any real life image editing to get like that unless you were doing it for effect (as I was). Perhpas I shouldn't have posted, I thought it would serve to illustrate, but it apperas to have had the opposite effect, sorry.

Given your concerns, suggest you stick to 48bit tiffs, then there's nothing lost. you can always convert down later.
Kev

Man is limited by his fears, not by his imagination.
Kevgermany
Site Admin
 
Posts: 5269
Joined: Fri Feb 25, 2005 9:11 pm
Location: near Munich, Germany

Postby gcrogers » Mon Aug 20, 2007 8:16 pm

Chris, I wouldn't worry much about being confused. I have a basic understanding of this stuff (certainly much less than those posting herein though) and this thread is actually confusing ME a bit. :shock:
-Greg
User avatar
gcrogers
Site Admin
 
Posts: 2050
Joined: Sun Mar 27, 2005 5:29 pm
Location: Indiana, USA

48 bit????

Postby Chris26 » Mon Aug 20, 2007 8:25 pm

Kev, no need to apologise, I appreciate the help. As for 48 bit, can't do that. But then I suppose sticking to saving everything in tiff at 24 would be your advice?

thanks
Chris26
 
Posts: 46
Joined: Tue Jul 24, 2007 10:09 pm
Location: Rep of Ireland

Next

Return to Windows and Mac users

Who is online

Users browsing this forum: No registered users and 0 guests