1 2 Previous Next 46 Replies Latest reply: Oct 8, 2013 7:44 AM by G.Hoffmann RSS

    Why do my JPEG file sizes shrink so dramatically?

    Amy2014 Community Member

      This has got me completely and utterly baffled.

       

      I have an image that I saved using Photoshop as JPEG at max quality and on disk it is 12.3mb.

       

      After placing it at 100% in InDesign that spread when exported as a PDF with images set to max quality is a mere 2.9mb. (The spread is two pages, the image on one and the month of a calendar on the other)

       

      The image in Photoshop is 3900px by 2650px and at 300ppi it's 33.02cm by 22.44. It is converted to CMYK and saved as JPEG at max 12

       

      In InDesign it's frame is 330.2mm x 224.367mm on a document of 318mm x 212mm with 6mm bleed all round.

       

      When InDesign is exporting as a PDF it must be recompressing the JPEG? Yet it seems to be throwing away 10mb even at max quality (see below) Or is it that Photoshop is saving CMYK JPEGs wrongly and producing files way too big - I've always thought PS produces huge JPEGs once you convert them to CMYK

       

      What tests can I do? Have tried various output settings, these are current

       

      screenshot.jpg

        • 1. Re: Why do my JPEG file sizes shrink so dramatically?
          Doc Maik Community Member

          Have you verified that the exported PDF contains CMYK images?

          • 2. Re: Why do my JPEG file sizes shrink so dramatically?
            Amy2014 Community Member

            Hi Doc

             

            I haven't. I did try but I don't know how to do it. I have Adobe Reader and I can examine details about the document's properties like if any fonts are embedded but I can't see any info on the images at all.

            • 3. Re: Why do my JPEG file sizes shrink so dramatically?
              Eugene Tyson CommunityMVP

              http://forums.adobe.com/thread/1068393

               

              There's a very real difference between "jpeg" and "automatic jpeg".

               

              It's most likely with Automatic JPEG that the information is being zipped rather than lossy.

              • 4. Re: Why do my JPEG file sizes shrink so dramatically?
                Amy2014 Community Member

                Thanks Eugene but if it was being zipped then I would expect file size to increase rather than losing 10mb - clearly something lossy is going on and it doesn't matter whether I choose "jpeg" or "automatic jpeg" I lose about 10mb

                • 5. Re: Why do my JPEG file sizes shrink so dramatically?
                  Eugene Tyson CommunityMVP

                  Choosing JPEG again might be adding another compression level again.

                   

                  Choosing Automatic JPEG the application will decide what's best, lossy compression (losing actual data), and zipping.

                   

                  And it's probably zipping the JPEG which would make it smaller, not bigger.

                   

                   

                  If you think you're losing data then choose no compression at all. You'll see a much larger file than what you actually started with.

                   

                  You can always set your compression setting to compress images of 301 (instead of 450) - and then the image shouldn't be hit by the compression settings at all.

                  • 6. Re: Why do my JPEG file sizes shrink so dramatically?
                    Eugene Tyson CommunityMVP

                    If you had Acrobat Pro you would be able to tell if the image was compressed again.

                     

                    If you're not sure - feel free to send me a private message and you can email me the PDF and I will check out the image to it.

                     

                    If it's not sensitive, and can be shared openly - feel free to upload to file sharing site, like dropbox, google drive etc. and share a public link.

                    • 7. Re: Why do my JPEG file sizes shrink so dramatically?
                      Amy2014 Community Member

                      I didn't think it was possible to shave 80% off a JPEG file using zip

                       

                      Anyway I have just done some tests

                       

                      The CMYK jpeg from Photoshop is 12.3mb

                       

                      When that singple page is to PDF with compression set to Automatic (JPEG) and image quality set to Maximum the resulting file is 2.93mb

                       

                      When the setting is changed to JPEG with image quality set to Maximum the resulting file is also 2.93mb

                       

                      I'm pretty sure that for that page InDesign chose max quality JPEG in either case rather than using zip or any other compression.

                      • 8. Re: Why do my JPEG file sizes shrink so dramatically?
                        Eugene Tyson CommunityMVP

                        Amy2014 wrote:

                         

                        I'm pretty sure that for that page InDesign chose max quality JPEG in either case rather than using zip or any other compression.

                         

                        Well you're not really "pretty sure" - that's a guess.

                         

                        Get a trial of Acrobat Pro.

                         

                        You will be able to use Edit to open the image in photoshop to see the real result.

                        http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe- acrobat-xi-edit-text-and-images-in-a-pdf-file-tutorial-ie.pdf

                         

                        Plus you could be converting to a different colour profile, like RGB which would add to the data loss (1 less channel than CMYK)

                        • 9. Re: Why do my JPEG file sizes shrink so dramatically?
                          Eugene Tyson CommunityMVP

                          Or converting to a colour profile of sRGB -

                          • 10. Re: Why do my JPEG file sizes shrink so dramatically?
                            Amy2014 Community Member

                            Whether I chose Automatic or chose JPEG I got the same result so that surely rules out zip compression.

                             

                            I've just tried compressing my 12.3mb CMYK JPEG with zip software and the best I can get it down to is 12mb using 7zip's .7z format set to ultra.

                             

                            I'm now confident that InDesign isn't zipping the jpeg and , like you, I do suspect that the images are being converted back to sRGB at some point

                            • 11. Re: Why do my JPEG file sizes shrink so dramatically?
                              Eugene Tyson CommunityMVP

                              Well you need to go to the Colour portion of the PDF settings and choose "No Colour Conversion"

                               

                              Don't select anything for compression in the compression portion of the PDF settings.

                              • 12. Re: Why do my JPEG file sizes shrink so dramatically?
                                Amy2014 Community Member

                                Last time I did prepress work was two or three years ago with CS4 and the PDF files were reassuringly large with JPEG compression turned on.

                                 

                                If I don't select anything for compression I get 40mb files, my email limit is 20mb, I might go down the route of using Google Drive / Dropbox but I want to solve this puzzle.

                                 

                                Current settings are "No Colour Conversion". I've actually tried specifying "Coated F0GRA39 (ISO 12647-2:2004)" as Destination and selecting "Convert to Destination" in Colour Conversion drop down.

                                 

                                Nothing works, from starting out with default [Press Quality] then tinkering. I've been turning of things like "Crop Image Data to Frames" despite knowing that my image fills the frame 100% and there's none outside anyway.  Baffled.

                                • 13. Re: Why do my JPEG file sizes shrink so dramatically?
                                  Eugene Tyson CommunityMVP

                                  Is your JPEG image set to Coated Fogra 39 in the Colour Profiles in Photoshop?

                                   

                                  What are your colour management policies in InDesign?

                                  • 14. Re: Why do my JPEG file sizes shrink so dramatically?
                                    Doc Maik Community Member

                                    Is it possible to have one page of the exported PDF for analysis? I got Acrobat Pro here.

                                     

                                    Just attach it to a reply.

                                    • 15. Re: Why do my JPEG file sizes shrink so dramatically?
                                      P Spier CommunityMVP

                                      Doc Maik wrote:

                                       

                                      Just attach it to a reply.

                                      Sorry, attachemnts are not enabled on the forums. You would need to link to a server someplace....

                                      • 16. Re: Why do my JPEG file sizes shrink so dramatically?
                                        Amy2014 Community Member

                                        The image is of a semi-naked girl for a charity calendar, I'm going to duplicate all the documents with a censored image and will post a link here shortly.

                                         

                                        InDesign Colour Settings are Europe General Purpose 3 same in PS

                                         

                                        04-10-2013 13-20-41.jpg

                                        • 17. Re: Why do my JPEG file sizes shrink so dramatically?
                                          BobLevine CommunityMVP

                                           

                                           

                                          What tests can I do?

                                           

                                           

                                          Print it.

                                          • 18. Re: Why do my JPEG file sizes shrink so dramatically?
                                            Amy2014 Community Member

                                            My files are here: https://drive.google.com/folderview?id=0B5tpebpwHlb0aFU4VUV1R2M1amM&usp=sharing

                                             

                                            There's the indd file cut down to two pages, the PDF output which is under 3mb (which I suspect is somehow sRGB) and the original files are in the folder created with Package.  I've pixelated the image which has knocked it down to 11.1mb when saved in Photoshop. Press PDF is coming out at 2.92mb.

                                             

                                            I know I've misspelt censored, it's been a long night and it's now daytime in UK

                                             

                                            04-10-2013 13-35-54.jpg

                                            • 19. Re: Why do my JPEG file sizes shrink so dramatically?
                                              Michael Witherell CommunityMVP

                                              Hey Gang, just in case you ever wondered about JPG compression:

                                               

                                              The JPEG algorithms performs its compression in four phases:

                                              1. The JPEG algorithms first cuts up an image in blocks of 8x8 pixels. It converts image data to a luminance/chrominance color space, such as YUV. The algorithm retains more of the luminance in the compressed file.
                                              2. Next, apply a Discrete Cosine Transform (DCT) for the block. It replaces actual pixel color data for values that are relative to the average of the entire matrix. This replaces 8x8 pixel values by an 8x8 matrix of DCT coefficients.
                                              3. Two tables of quantization constants are calculated; luminance and chrominance. The constants from the two tables are used to quantize the DCT coefficients. Each DCT coefficient is divided by its corresponding constant in the quantization table and rounded off. The result of quantizing the DCT coefficients is that smaller coefficients will be replaced by zeros and larger coefficients will lose precision. This rounding-off causes a loss in quality. The resulting data are a list of streamlined DCT coefficients.
                                              4. Last, compress these coefficients using either a Huffman or arithmetic encoding scheme. Usually Huffman encoding is used. This is a second (lossless) compression that is applied.

                                               

                                              By putting 2 compression algorithms on top of each other, JPEG achieves remarkable compression ratios, up to 20-to-1 can be achieved. JPEG decompression is supported in PostScript level 2 and 3 RIPs. This means that smaller files can be sent across the network to the RIP which frees the sending station faster, minimizes overhead on the print server and speeds up the RIP. The downside of JPEG compression is that the algorithm is only designed for continuous tone images. JPEG not does not lend itself for images with sharp changes in tone.

                                              • 20. Re: Why do my JPEG file sizes shrink so dramatically?
                                                vectorbabe Community Member

                                                What I've always wondered about is why so many web sites default to jpg when gif would be much better for flat art.

                                                • 21. Re: Why do my JPEG file sizes shrink so dramatically?
                                                  Eugene Tyson CommunityMVP

                                                  Makes sense.

                                                   

                                                  To put the OP at rest - I opened the image from the PDF in Photoshop - by using the Edit options in Acrobat.

                                                   

                                                  The image is opening at 49mb at the original specs noted above.

                                                  • 22. Re: Why do my JPEG file sizes shrink so dramatically?
                                                    BobLevine CommunityMVP

                                                    Thanks, Eugene.

                                                     

                                                    The ironic thing is most people complain that their PDFs are too large.

                                                    • 23. Re: Why do my JPEG file sizes shrink so dramatically?
                                                      Amy2014 Community Member

                                                      Eugene are you saying the image in the PDF is CMYK?

                                                       

                                                      "The image is opening at 49mb"

                                                       

                                                      I'm still losing data though. Even a blank image of that depth and size would be that sort of size when uncompressed.

                                                       

                                                      In the files above I'm putting in a max quality JPEG of 11,743,167 bytes and after a trip through InDesign it's coming out at 3,068,891 even at Max quality

                                                       

                                                      8 megs has gone missing and I doubt it's lossless.

                                                       

                                                      Can someone else try loading the file into InDesign and outputting as a Press Ready PDF with compression set to JPEG at Quality Maximum and letting me know your final PDF size

                                                      • 24. Re: Why do my JPEG file sizes shrink so dramatically?
                                                        BobLevine CommunityMVP

                                                        Using PDF/X-4 the file is 2.58 mb. Using Press setting it's 2.1.

                                                         

                                                        I still say you're worrying about nothing.

                                                        • 25. Re: Why do my JPEG file sizes shrink so dramatically?
                                                          Eugene Tyson CommunityMVP

                                                          There is nothing lossy going on.

                                                           

                                                          You've been told this so many times.

                                                           

                                                          Get on with the job.

                                                           

                                                          If you're worried about your image quality then saving to a jpeg firstly was a huge mistake.

                                                           

                                                          InDesign is not creating a lossy version of your image - it's compressing it using all the techniques that Michael has clearly explained.

                                                          • 26. Re: Why do my JPEG file sizes shrink so dramatically?
                                                            Amy2014 Community Member

                                                            Can't understand you being so rude Eugene - I want to 'get on with the job' but the printer has expressed concerns at the small size of the PDF and the photographer is also concerned.

                                                             

                                                            Michael did a great job of explaining how JPEG compression is able to achieve such significant reductions in files sizes and that would explain why InDesign crunches a 12mb jpeg down to 3mb. It doesn't explain why Photoshop doesn't do the same.

                                                             

                                                            Is it that Photoshop isn't as good at saving to JPEG or that InDesign throws more info away?

                                                             

                                                            Are both programs keeping the same amount of info but Photoshop is inefficient in dealing with JPEG?!

                                                             

                                                            I've experimented by using TIFF.

                                                             

                                                            The same 40mb CMYK TIFF saved by InDesign at Max quality is 3mb whereas Photoshop knocks it down to 10mb when quality is set to Max. In both cases the compression used is JPEG. Not Automatic, not zip.

                                                             

                                                            Try it.

                                                             

                                                            What happens if you export Page 1 of that documents as a CMYK JPEG from InDesign? Bigger or smaller than the highest quality PDF?

                                                            • 27. Re: Why do my JPEG file sizes shrink so dramatically?
                                                              Eugene Tyson CommunityMVP

                                                              Don't mix "rude" with "exasparation".

                                                               

                                                              I have taken my own time to look at your file.

                                                               

                                                              No further compression has happened with your file.

                                                               

                                                              If so worried about quality then saving as a jpeg from the start was your mistake.

                                                               

                                                               

                                                              If you don't like InDesigns compression of the images then talk to your printers about preparing an FPO (For Postion Only) and send them the original JPEG.

                                                               

                                                              They can sway the image in the layout for your JPEG at the RIP.

                                                               

                                                              That will quall your worries.

                                                               

                                                              And you have nothing to worry about.

                                                               

                                                              Press on with the job.

                                                               

                                                              Get a chromalain proof get what you need to make the job happen the way you want.

                                                               

                                                               

                                                              But don't spend any more time on this. You're wasting your time.

                                                               

                                                              Nothing to worry about.

                                                              • 28. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                Amy2014 Community Member

                                                                I can probably proceed with the job but in order to satisfy my curiousity I still want to know why in InDesign does this. If this exasparates you please bow out of the discussion.

                                                                 

                                                                I've even ruled out Photoshop because just in InDesign the same data exported with JPEG as the compressor at quality of maximum is five times bigger using one export method than with the other.

                                                                 

                                                                Look at the file sizes below, both files created by exporting from InDesign. What's happened to the image data in the pdf version when the same image saved as a standalone JPEG at max quality is far, far bigger?

                                                                 

                                                                The PDF route must be compressing the image data more and it must be doing it with lossy compression because JPEG is lossy and that's what's selected. When embedded in pdf the jpeg is suspiciously more the size of an sRGB jpg of the same resolution.

                                                                 

                                                                04-10-2013 21-12-08.jpg

                                                                04-10-2013 21-03-27.jpg04-10-2013 21-10-35.jpg

                                                                • 29. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                  rob day CommunityMVP

                                                                  There's a trick you can use in Photoshop that shows the changed pixels in a compessed jpeg file.

                                                                   

                                                                  I replicated your scenario by saving a 16"x25", CMYK image as 12 JPEG out of Photoshop. Then placed it in a same sized ID page and exported to PDF/X-1a with Maximum quality compression. I got a similar change in file size 23MB vs. 7MB.

                                                                   

                                                                  If I place the exported PDF on the original PS JPEG I can then use the Difference blend mode and see any changed pixels. Like this:

                                                                   

                                                                  Screen Shot 2013-10-05 at 8.55.23 AM.png

                                                                   

                                                                  Screen Shot 2013-10-05 at 8.56.09 AM.png

                                                                   

                                                                  Screen Shot 2013-10-05 at 8.57.54 AM.png

                                                                   

                                                                  If the pixels were identical the Difference mode would show them as all black (0) and the Std. Dev. would be 0. The more compression the greater the number of non-black pixels, and the higher the Std. Dev. gray level showing in the Histogram.

                                                                   

                                                                  You can see in my test the Std. Dev. is less than half a gray level, which would be impossible to detect in print.

                                                                  • 30. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                    Amy2014 Community Member

                                                                    That's super helpful Rob, I knew ID had to be throwing some more data away, great to know that visually it's not worth worrying about. Be nice to be able to tell InDesign to leave the original data alone though at "max" quality

                                                                    • 31. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                      BobLevine CommunityMVP

                                                                      Don't use JPEG in the export.

                                                                      • 32. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                        Amy2014 Community Member

                                                                        I have to Bob, I need to keep my file sizes under 20mb, my choice is 40mb per file without jpeg compression or 3mb with, Chris the photographer - who provided the 12mb original jpegs - is concerned I'm over-compressing when exporting

                                                                        • 33. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                          rob day CommunityMVP

                                                                          is concerned I'm over-compressing when exporting

                                                                           

                                                                          It looks to me like PDF simply has a better compression algorithm and you want to take advantage of it. You could ask the photographer to provide .psd so there's only one round of compression, but there's no press condition where half a gray level would be visible—I'm sure you would have variations larger than that within the press run.

                                                                          • 34. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                            BobLevine CommunityMVP

                                                                            Then why is he sending you JPEGs? Seems a bit crazy to be sending those

                                                                            and then worrying about what JPG does to a photo.

                                                                            • 35. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                              G.Hoffmann Community Member

                                                                              (Referring to Mike Witherell., #19)

                                                                               

                                                                              Mike, your description is correct for RGB images. Here are some additional illustrations:

                                                                              http://docs-hoffmann.de/jpeg131200.pdf

                                                                               

                                                                              For CMYK images a decomposition Luminance-Chrominance (Y-CbCr) would destroy

                                                                              the black generation. The problem can be overcome by compressing each channel

                                                                              C,M,Y,K  independently as a grayscale image.

                                                                               

                                                                              Edited:

                                                                              Very little reliable information can be found. It seems, for this application the color space

                                                                              YCCK had been invented, which is a combination of Y-CbCr plus a single channel for K.

                                                                              Compressing the first part as usual and the second as a single grayscale should work,

                                                                              preserving the black generation.

                                                                              http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch6/ch6_color_mod els.html

                                                                               

                                                                              Of course these issues are not really relevant for the actual thread.

                                                                               

                                                                              Best regards --Gernot Hoffmann

                                                                               

                                                                              There is a discussion, initiated by Amy, in the Photoshop Forum as well:

                                                                              http://forums.adobe.com/message/5738933

                                                                              • 36. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                                Michael Witherell CommunityMVP

                                                                                Gernot,

                                                                                 

                                                                                I had this summary in my Photoshop ppt of notes now already for many years. Probably originally I was quoting from your writings, but I don't remember. I should acknowledge that I am not the originator of these thoughts. I just share them in the classroom.

                                                                                • 37. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                                  [Jongware] CommunityMVP

                                                                                  Amy2014 wrote:

                                                                                   

                                                                                  This has got me completely and utterly baffled.

                                                                                   

                                                                                  I have an image that I saved using Photoshop as JPEG at max quality and on disk it is 12.3mb.

                                                                                   

                                                                                  Your disk image is not JPEG-compressed; it's a TIFF file with an EXIF wrapper. The large difference is because (1) the original image is *not* compressed, and (2) in the PDF it is *highly* compressed (with a slight loss of data). And (3) there is a slight size reduction -- 3900 x 2650 in the original, 3765 x 2513 in the PDF, so it's also 8.5% smaller (admittedly, not as significant as pts 1 and 2 combined).

                                                                                   

                                                                                  Inside the PDF it is a JPEG, as confirmed by Acrobat Preflight -> Inventory. This shows it uses "JPEG compression (DCTDecode)".

                                                                                   

                                                                                  For the original image, Apple's Preview (of all!) shows a 'TIFF information' field and says it's an uncompressed (!!) TIFF image. Examining the original file with a hex editor shows that this appears to be correct. (*)

                                                                                   

                                                                                  You or your photographer presumably saved this from within Photoshop as a JPEG, but set the dialog options in such a way PS decided to save it in this format. Hold on while I check ... Hmm. By default, saving as TIFF preserves the original compression, and when saving it indeed says "None" in the Image Compression field. I wonder if the presence of EXIF information made PS work this way. Maybe someone on the PS forum can tell you that.

                                                                                   


                                                                                   

                                                                                  (*) Maybe not entirely true. For CMYK, the raw size would be 4 x 3900 x 2650 ~ 40 MB. If pressed, I could probably find out why this image is still only a quarter of that, but I think the main point is clear enough.

                                                                                  • 38. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                                    G.Hoffmann Community Member

                                                                                    Jongware,

                                                                                     

                                                                                    I had confirmed Amy's workflow with my own image. Data are here in #3:

                                                                                    http://forums.adobe.com/message/5740039

                                                                                     

                                                                                    In my opinion, the JPEG compression settings in InDesign and Photoshop

                                                                                    are different.

                                                                                    It can be assumed that PhS qual.12 doesn't use color subsampling

                                                                                    but ID does. Color subsampling*) shrinks the file size for an RGB image

                                                                                    already by factor 1/2. For CMYK, which contains RGB=3/4 plus K=1/4

                                                                                    size the compressed size will be (1/2)·(3/4) + 1/4 = 5/8.

                                                                                     

                                                                                    All the other compression effects are additional.

                                                                                     

                                                                                    Furtheron it's very important to know, whether the CMYK profile (ca.2MB)

                                                                                    is embedded or not. In my example this is clearly mentioned.

                                                                                     

                                                                                    I don't think that InDesign has an "improved" JPEG compression which

                                                                                    could explain  the observed effects. 

                                                                                     

                                                                                    Best regards --Gernot Hoffmann

                                                                                     

                                                                                    *) the most effective method uses only one of four value pairs Cb,Cr.

                                                                                    • 39. Re: Why do my JPEG file sizes shrink so dramatically?
                                                                                      [Jongware] CommunityMVP

                                                                                      Gernot, sorry, I didn't follow the discussion all the way to the PS forum.

                                                                                       

                                                                                      Nevertheless, my main point:

                                                                                       

                                                                                      I don't think that InDesign has an "improved" JPEG compression which

                                                                                      could explain  the observed effects.

                                                                                       

                                                                                      .. the original file was not JPEG compressed (even though the file name seemed to indicate that), and so that fact in itself does explain the huge difference.

                                                                                      1 2 Previous Next