Announcement

Collapse
No announcement yet.

What is the best way to compress a picture?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Pugwash2 View Post
    I thought that saving jpeg at 80% quality was roughly equivalent to saving with the same quality level of the image you opened.
    Apparently only true if the file you just opened was previously saved at a quality setting of 80. If it was saved at a setting of 50, I believe you will get the best results by saving it at 50 again.

    See this feature request thread. It is best to always open the original files (first saved from the camera at highest quality), and then save them at whatever compression quality is suitable for the current purpose (web, print, thumbnail, email, etc.).

    JPG is lossy, so every time you save and reopen an image you have different pixels to what you started with, and a different number of colours. The differences are so small that you're unlikely to see any difference, but the differences are there nevertheless. Check the number of colours on the Information dialogue.

    The attachment illustrates what happens when you compress images with JPG.
    100 50.jpg means it was compressed first at 100, then reopened and compressed at a setting of 50.
    Turn off resampling and zoom in to compare the artifacts.
    Crop each area in turn, and check the Image Information (Shortcut I) to see the number of colours.
    Attached Files
    Last edited by Bhikkhu Pesala; 16.03.2008, 06:56 PM.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #17
      While I am not a compression expert, and I will not argue with anyone who purports to be, I do believe I have a more than average understanding of the concept of JPG compression. Here is my, perhaps skewed but clear in MY mind, idea of the adjustable JPG range.

      When you select 100% you are telling IrfanView to save the current image with as good as color and detail rendition as possible - within the ability of a lossy scheme (not the lossless JPG, also referred to as JP2). When you select that 100% you are saying to not "cut corners," to not compromise with "close enough colors," to not meld some lines and edges with some blurriness. Selecting 100% may make an already less than 100% image larger, because you are saying you want to get back no less quality than you already have.

      When you select 80% (or anything lower than 100%) you are telling the tool to compromise within the relative value you have selected (it is NOT a linear scale). Selecting some lower value you are allowing some edges to blur, to allow some close-enough colors, to even allow some pixelation - all with the intent to be able to find some compression efficiency.

      Opening a JPG image that is already saved at 80% and re-saving at 80% should get approximately the same size file ONLY when all the saves were done with the same tool, IrfanView, in this case.

      When another tool was used to make the JPG and now you use IrfanView to make the new one, and you now will probably have two results.
      The reason is: one tool's scheme to save at (for example) 80% may not be the other tools idea of how to come to some 80% quality. In other words, Tool1 may compromise more with edges to find some savings, whereas Tool2 may compromise more with colors to get to the same sort of savings. Second, there is no standard scale of what 80% (or any value) means. One tools idea of 80% may direct itself to find a compression with the resulting file being just 80% of the 100% file size.

      Also, please realize that a camera has it's own idea of JPG compression (not the same as IrfanView) and you may not even have any control of how much compression you desire. It may be fixed at 75%, 80%, 90%, who know? and besides, using what scale?

      Which might be a good reason that I have not seen any tool to report the current quality save of the current picture. (Your 80% might not be my idea of 80%, and what method did you use to get to that value, anyway?)

      IrfanView's scale is quite non linear. Saving to 40% results in a file size much, much less than half of the 80% quality. Saving at 50% is much, much less than half, even less than one-fourth the 100% size.

      So, Pugwash2, it does not surprise me that you have found that re-saving camera JPGs with IrfanView at 80% does not result in identical size files. That you have found that to get nearly identical size files you need to adjust IrfanView to save at 93%. Also, saving at 100% results in a larger file. All that aligns with my idea of how the JPG adjustable compression works. I hope some of that helps clarify it for you. Or, at least, stirs up some reasoning that works for you as to what really happens.
      I wish to die peacefully in my sleep, like my grandfather.
      Not like those passengers, in his car, when he drove over that cliff.

      Comment


        #18
        Excellent.
        A potential TechDoc, this thread, IMO.

        And I found more descriptions here
        Last edited by Sam_Zen; 17.03.2008, 02:13 AM.
        0.6180339887
        Rest In Peace, Sam!

        Comment


          #19
          I would not consider anything I have written above as a TechDoc, it it too general and "by the seat of my pants" construed. Like I mentioned, I am not an expert ... far from it. I like to think I have a more than rudimentary knowledge of some things, and I would not bet my life on what I have opined.

          I do like the link that you gave for the JPG FAQs. I read through what is there, and it seems I am not far off the information there. Thanks!!
          I wish to die peacefully in my sleep, like my grandfather.
          Not like those passengers, in his car, when he drove over that cliff.

          Comment


            #20
            Thanks Bhikkhu, Chuck and Sam, that has all been a great help to getting my brain around it all, and the links to further info very informative. I also agree with Sam - Chuck, you explained it really well.
            My favourite quote: “The scientific theory I like best is that the rings of Saturn are composed entirely of lost airline luggage” ~ Mark Russell
            www.photofilecornwall.co.uk
            Come to Cornwall!

            Comment


              #21
              There you go, ChuckE.. We're not waiting for a thorough scientific dissertation written after 2 years.
              As Pugwash2 stated : you explained it really well. And I prefer an educational value above dry facts.
              It's about getting insight in the matter, not remembering the right formula.

              Still more can be found about JPG at Wotsit.org
              0.6180339887
              Rest In Peace, Sam!

              Comment


                #22
                Originally posted by Sam_Zen View Post
                I prefer an educational value above dry facts.
                It's about getting insight in the matter, not remembering the right formula.
                I would totally agree

                Lots of really interesting comments and suggestions that are all very helpful.

                Comment

                Working...
                X