• 01-12-2009, 06:41 PM
    Ron Kruger
    JPEG Compression Particulars
    A JPEG is a compression file, but exactly what does that mean, and what exactly are "thumbs?"
    A few years ago, before most computers became so powerful, a lot of companies sold file compression software. I had one, and I could compress little used files to a fraction of what they were, and if later I needed that file, or part of it, I could decompress the files to their original size.
    Is JPEG compression similar to that, and are "thumbs" the compressed information, or at least a portion of it, that was originally recorded by a camera's sensor? And, when expanding a compressed JPEG by converting it to a much larger TIFF file, does the software expand upon the original information (thumbs) to decompress files similar to what those old file compression programs did with word files and such?
  • 01-12-2009, 07:19 PM
    OldClicker
    Re: JPEG Compression Particulars
    Quote:

    Originally Posted by Ron Kruger
    A JPEG is a compression file, but exactly what does that mean, and what exactly are "thumbs?"
    A few years ago, before most computers became so powerful, a lot of companies sold file compression software. I had one, and I could compress little used files to a fraction of what they were, and if later I needed that file, or part of it, I could decompress the files to their original size.
    Is JPEG compression similar to that, and are "thumbs" the compressed information, or at least a portion of it, that was originally recorded by a camera's sensor? And, when expanding a compressed JPEG by converting it to a much larger TIFF file, does the software expand upon the original information (thumbs) to decompress files similar to what those old file compression programs did with word files and such?

    First, thumbs are just small copies used to represent the larger picture. They have nothing to do with the file itself.

    The file compressions you are referring to (the most popular was/is Zip) are not the same as a jpg compression. Regular files (like spreadsheets, word processors and, to a very small extent, images) are full of non-information. For instance, a spreadsheet can have 10,000 cells with information in only 10 cells. The spreadsheet file will still store all 10,000 cells. Zip will only store the 10 cells with information. No data is lost. If the spreadsheet did have information in 10,000 cells, Zip would save all 10,000 and there would be very little compression.

    jpg compression uses an algorithm to actually not save some of the information and then to try to figure out what that lost data was when the file is again opened. It does a very good job of this, but data is lost.

    TF
  • 01-12-2009, 08:03 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    Thanks, Clicker.
  • 01-14-2009, 11:02 AM
    Ron Kruger
    Re: JPEG Compression Particulars
    Dear Clicker,
    I noticed something yesterday. I converted some RAW files to 8-bit TIFFs, and the file came out exactly the same size (41.5 MB) as the files I converted from JPEG to TIFF.
    Looks suspiciously like the same thing from two different directions.
    What do you think?
  • 01-14-2009, 12:32 PM
    OldClicker
    Re: JPEG Compression Particulars
    Quote:

    Originally Posted by Ron Kruger
    Dear Clicker,
    I noticed something yesterday. I converted some RAW files to 8-bit TIFFs, and the file came out exactly the same size (41.5 MB) as the files I converted from JPEG to TIFF.
    Looks suspiciously like the same thing from two different directions.
    What do you think?

    You are saying you took a shot with RAW + JPG in the camera, downloaded them both and just converted them to tif? I'll try it. - TF
  • 01-14-2009, 12:51 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    No, the conversions were on different images, but both the one converted from a RAW and the one converted from a JPEG (both to 8-bit) came out with the exact same file size which was 40.5 MB, not 41.5 MB.
  • 01-14-2009, 01:17 PM
    opus
    Re: JPEG Compression Particulars
  • 01-14-2009, 02:51 PM
    drg
    JPEG & TIFF web resources
    Good stuff Opus! I'd been looking for those Purdue links after I somehow misplaced or deleted them some time ago.

    The JPEG group site can be found at:

    http://www.jpeg.org/committee.html

    It should be stated that the jpeg format we generally use is a public domain version of this organizations specification. They translate the same way mathematically but are generated by slightly different algorithms.

    TIFF (Tagged Image Format Files) is a standard/Format owned by ADOBE but was originally developed for line art output from scanners (both flatbed and scanning camera backs) to be often fed directly to a Raster Image Processor (RIP engine). The original two or three specs also had optimizations in structure to aid in use with Postscript.

    The ADOBE Systems developer information can be found at:

    http://partners.adobe.com/public/dev...iff/index.html

    Certain printing processes like what is thought of generically as offset, can benefit greatly from having the computer controls fed by a TIFF file that has never been lossy encoded. The edges are cleaner and straight lines will be less or not broken. Reproductions of diagrams, blueprints, schematics, flow charts, etc., are almost always reproduced via a TIFF type file.

    A JPEG file translated to a TIFF file is no better than the original JPEG as you do not gain any thing as the damage was already done in the original JPEG encoding.

    The links opus included in her post clearly show what starts to happen even at low levels of encoding/compression of this type!
  • 01-14-2009, 04:15 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    Thanks, Opus. The math in the last link lost me after a while, but I think I'm understanding the compression process. It did say, however, in a couple of the links, including the last, that some of the discarded information is recoverable, and I still suspect that's what's happening in this latest PS software when I covert a JPEG to TIFF.
    By the way, when processing my JPEGs, originally shot in low-compression format, in PS, I save them in the largest files possible (100) and set the dpi resolution at 400, 500 or 600, depending upon the severity of the crop (the tighter the crop the higher the dpi I use). These give me fairly large files of 5 or 6 MB that take a little longer to load but are still small enough to email.
    All of the imformation in Opus' links concerned processing files for the internet, but I suspect when processing them for print publication, dpi is a very important aspect, which we haven't discussed. Before digital, dpi was everything, and the number of dpi affected the quality of the image in sharpness, clearity, contrast and color saturation.
    Now I suspect that dpi and pixels are similar creatures, but also suspect that pixels are computer creatures, while dpi remain printing creatures and are still very important.
  • 01-14-2009, 04:25 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    It said in at least one of Opus' links the same thing I've heard from you guys: that each time you open AND save a JPEG file, it degrades it slightly. What I'm wondering is if it also degrades the file when you simply open it to look at it, or if the degradation only occurs when the file is re-saved?
  • 01-14-2009, 05:18 PM
    opus
    Re: JPEG Compression Particulars
    I don't believe that just opening and closing a file degrades it. The creation date on the file doesn't change, which indicates that nothing has altered in the file. If it were the case that just opening a file would degrade it, I think you would see considerable degradation of certain internet pictures over time.

    While I've never read anything to confirm my opinion (and nothing to disprove it either), I would feel comfortable stating that I am 100% certain that just opening a file doesn't degrade it. At least not at the file level. Perhaps the visual drawing algorhythm has to make up information, but that wouldn't be permanent.

    It is also true that when you lose information, you don't ever "get it back." An algorhythm can make a very good estimate of what the missing information should be, but it is still "adding" information. That's why after so many jpeg saves, you've lost significant information. Pretty soon there's not enough information to make a correct guesstimate on what should be added back.

    DPI is still everything when it comes to print publication. You are correct.
  • 01-14-2009, 06:10 PM
    OldClicker
    2 Attachment(s)
    Re: JPEG Compression Particulars
    Quote:

    Originally Posted by Ron Kruger
    No, the conversions were on different images, but both the one converted from a RAW and the one converted from a JPEG (both to 8-bit) came out with the exact same file size which was 40.5 MB, not 41.5 MB.

    I tried it using the RAW-Large jpg on the Canon and got the same type of results for the same image. jpg= 4 MB, RAW= 13 MB, tif from jpg= 29 MB, tif from RAW= 29 MB.

    Next I saved the jpg as a low quality jpg and then saved that as a tif. Same file size (29 MB) even though these two crops show that they are not the same quality. So tif size does not mean quality.

    TF

    EDIT: Made them bigger so we could see the difference. - TF
  • 01-14-2009, 06:57 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    Thanks, Clicker. That's good to know. I guess I'm wasting my time, and CD space, coverting JPEGs to TIFFs. But I still wonder what is taking up 40.5 MB?
  • 01-14-2009, 10:58 PM
    opus
    Re: JPEG Compression Particulars
    Ron, if your camera takes jpegs to begin with, and you are going to alter the file in any way, (i.e. post processing, crop, etc.) you SHOULD still convert to TIFF. Only because then you're stopping the loss on the next save.

    If you're doing nothing to the files, then yes, you're wasting disk space converting to TIFF.
  • 01-15-2009, 12:47 PM
    Ron Kruger
    Re: JPEG Compression Particulars
    Thanks, Opus. You and others have been instrumental in helping me better understand the technology. I also appreciate everyone's patience, because I learned a long time ago to keep asking question (no matter how stupid it makes me look) until I'm absolutely sure I understand something. Sometimes people find this annoying, sort of like Colombo. I not only like to know what to do, but why.
    Most of what I send out has to be in JPEG format, but, thanks to you and others on this site, I've decided to shoot everything in RAW/JPEG, so I can conduct the vast majority of my business in JPEG with ease, but still have an original RAW of the same scene stored in my camera, just in case I come up with a composition of cover quality, or happen to mess the exposure up on a scene with good composition. This covers all the bases, so to speak. So in the future, I will be converting my better shots for cover submission to TIFFs only from RAW images, and make sure I only process and save JPEGs only once.
    I am also assume that I can download an original JPEG or RAW image from my camera as many times as I want without degrading either of them in the least? Another dumb question, maybe, but I've always remembered what an editor for a daily newspaper once told me when I said: I assumed..." He stopped me in mid sentence and said: "In this business, when you assume, you usually become the first three letter of the word."
    I don't know if you guys know how much you've help me--but it is considerably.
  • 01-15-2009, 10:37 PM
    opus
    Re: JPEG Compression Particulars
    A download is just a file copy. It goes through no conversion process, it's just written bit-by-bit from one hard drive to another.

    At least, that's how I understand it. Anyone who knows differently, please correct me.
  • 01-15-2009, 10:43 PM
    opus
    Re: JPEG Compression Particulars
    Quote:

    Originally Posted by Ron Kruger
    But I still wonder what is taking up 40.5 MB?

    The compression scheme has marker code to help figure out what information to "write back in" to the file when it's "decompressed." So that extra 40.5 MB is basically made-up information. The file is told to fill 40.5 MB of space with pixels, so it does.


    That's an overly simplified way of explaining the way I understand it.
  • 01-16-2009, 01:42 AM
    readingr
    3 Attachment(s)
    Re: JPEG Compression Particulars
    I always find this intriguing the differences between file formats. Then this week I read an article in a magazine about this and they suggested an experiment to allow people to see the difference.

    Anything that is not pure black is lost data.

    Here is the results for a JPG saved at best quality (12) v TIFF. There is a faint image in this one where it would be a pure black photo if there was no data loss. As you can tell it's not pure black.
    Attachment 63310

    Here is the result for a JPG saved at best quality (8) v TIFF. Well can you guess what it is yet?
    Attachment 63311

    Here is the original taken in RAW on the 5D.
    Attachment 63312

    Hope this helps people understand the difference through a visual comparison.

    You can do this yourself by saving a photo as a TIFF and then as a JPEG. Then add the JPEG as a layer on top of the TIFF layer and set the JPEG layer blend mode to 'Difference' then create a level layer and set to 'Auto' and then flatten. the layers.

    Roger