Announcement

Collapse
No announcement yet.

What is the best way to compress a picture?

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

    What is the best way to compress a picture?

    Hi,

    I have recently downloaded IrfanView and am slightly confused as to the best way to compress a standard digital photo. Is it best to resize/resample (and to what size for emailing) or to go to Save As and just alter the quality?

    I have been looking on the help pages and some people suggest both whilst others state just the quality only.

    Any suggestions would be great.

    Thanks

    #2
    Originally posted by Beth View Post
    I have recently downloaded IrfanView and am slightly confused as to the best way to compress a standard digital photo.
    What is a standard digital photo? 1024x768 pixels used to be a common size, but modern digital cameras often produce much higher resolution images.

    No one can say what size is best for your purposes, but for large images it is best to resize before saving with compression. I would suggest that 800x600 is quite big enough. Again, no one can tell you what is an acceptable compression value. I would suggest no more than 75, and no less than 50 on the JPG save dialogue. Photos of people and natural scenes will still look good with high compression, while any image with text or sharp outlines (mechanical objects and buildings) will have artifacts that spoil sharp details unless you use a high setting.

    I attach two images compressed from the same original. Chindit Big is a bit bigger in bytes than Chindit Small, but which would you rather have?
    Attached Files
    Last edited by Bhikkhu Pesala; 10.03.2008, 10:59 AM.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Resizing a picture and compressing one are two different things. The first is the screensize, the second a filesize.

      A first aspect would always be : Can I decrease the number of colors without damaging the picture?
      Of course this is not often valid for photos of people and natural scenes.

      By the way, resizing with IV nearly always means that 'resample' should be enabled.
      Bhikkhu is right of course, first the resizing, and/or other modifications, and only at last the compression.

      I made some notes about this process on this page :
      0.6180339887
      Rest In Peace, Sam!

      Comment


        #4
        [Offtopic]Take a look at this YouTube Video on Seamless Image resizing[/Offtopic]
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          Thank you to you both for your replies, it has helped a lot. I had been getting confused with the difference between resizing v compression. So if I am to understand correctly, I would start with a photo, see if I can make it smaller in size, using the resizing option (e.g. taking it down to smaller pixels or reducing it by a %, keeping aspect ratio) and if this is then not small enough to a) send quickly in an email or b) upload onto a website so loading time is reduced then I would alter the quality in the Save As option to between 50 and 75 as Bhikkhu suggested known as compression and therefore altering the actual quality of the picture compared to just making it smaller but keeping most of the original pivture quality?

          Comment


            #6
            I hadn't thought of looking on You Tube for tutorials. Thanks that's useful too.

            Comment


              #7
              You describe the order of the procedure quite well.

              Since you want to keep quality as much as possible, it can be useful to 'save as' the resized picture first in uncompressed format,
              like BMP or single TIF, as a temporary file (renaming it by e.g. adding an 'x'), to compare it with the compressed result.

              So you can try a compression percentage setting, see what's left of the quality, and maybe pick a higher or lower value for a next 'save as'.
              Comparison with IV is easy if the two files have almost the same filename, by using the 'space' and 'backwards' keys.

              If you've tuned to the right setting of the result, you can remove the uncompressed file again.
              0.6180339887
              Rest In Peace, Sam!

              Comment


                #8
                Thanks for that Sam_Zen. The only question I have though, is why re-save the image as a BMP or single TIF, as a temporary file rather than the same file type as the original photo - jpeg?

                Thanks

                Comment


                  #9
                  This is a legitimate question.
                  A solid reason first could be to do the modifications with a copy of the original, so if anything goes wrong, the material is still there.
                  Then, why an uncompressed version to start with? This is more an intuitive concept.
                  I know that a conversion JPG2BMP can't possibly make the picture any better.
                  And I've got the idea, maybe I'm wrong, that a saving of JPG2JPG maybe means twice the execution of the compression ratio,
                  so worsening the quality.
                  Another aspect can be the original color depth. It maybe 256 colors, but some tools automatically turn it into full-color.
                  So it's more a practical thing : -with what do I start to make this modification and save it without much sub-steps?
                  0.6180339887
                  Rest In Peace, Sam!

                  Comment


                    #10
                    Originally posted by Sam_Zen View Post
                    ... And I've got the idea, maybe I'm wrong, that a saving of JPG2JPG maybe means twice the execution of the compression ratio, so worsening the quality.
                    In my experience, with IrfanView, that if I save a JPG to JPG, with identical compression settings, does not gain any additional space.

                    I typically save at "Image Quality" of 80, which gives adequate quality vs space-saving for me. But I have found that doing an "80 setting" from a previous "80 setting" gains me nothing.
                    I don't even notice any lessing of quality.

                    I have even tried it with at least 5 savings in a row:
                    Take a JPG > save at 80, take the result and again save at 80 > take the result and again save at 80 > take the result and again save at 80 > take the result and again save at 80. Finally, compare the first to the last. I don't notice any lowered quality.

                    Maybe it's just me ... ?
                    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


                      #11
                      I would have thought the same as Sam_Zen that saving from jpeg to jpeg would cause some loss so it is interesting you have found this not to be the case ChuckE. I would therefore be tempted to continue saving to jpeg as the TIF save options confuse me even more!

                      I did think I had read somewhere that BMP is not as good as jpeg due to the limited colours (256) and there are more that are saveable in jpeg format, suggesting that you would lose picture definition/quality by saving in BMP and therefore not be able to do quite so much to the picture before 'faults' are noticed, perhaps I have misread this?

                      Comment


                        #12
                        Originally posted by Beth View Post
                        I would have thought the same as Sam_Zen that saving from jpeg to jpeg would cause some loss so it is interesting you have found this not to be the case ChuckE. I would therefore be tempted to continue saving to jpeg as the TIF save options confuse me even more!
                        Repeatedly saving and reopening the same JPG image does cause some loss, but it is very hard to spot any visible difference. Check the number of colours though from IrfanView's Information button and the differences will show up.
                        I did think I had read somewhere that BMP is not as good as jpeg due to the limited colours (256) and there are more that are saveable in jpeg format, suggesting that you would lose picture definition/quality by saving in BMP and therefore not be able to do quite so much to the picture before 'faults' are noticed, perhaps I have misread this?
                        You're thinking of GIF format, which is limited to 256 colours. It is suitable for some non-photo images like this.

                        BMP format is not something to use — it is uncompressed and so the biggest of all. If you need a format that is lossless, try PNG — that offers better compression than TIF. If you save original photos from your camera as JPG — that's fine, but always open the original if you want to resize or recolour an image again, rather than opening one you did earlier.
                        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                        Comment


                          #13
                          Originally posted by Bhikkhu Pesala View Post
                          Repeatedly saving and reopening the same JPG image does cause some loss, but it is very hard to spot any visible difference. Check the number of colours though from IrfanView's Information button and the differences will show up.
                          Didn't we already have this discussion? I just did a search through these forums and I could not easily discover it, though. ...(hummmm)

                          Seems to me that I went through a lot of trials a while back, and found that, yes, there were some slight differences in the numbers of colors from save to save to save, (and I had specific results in that message). But the numbers all varied only slightly up or down, but way, way less than 1% of difference. Something like, at one time (and I am only making these numbers up right now) I had 200,000 colors in a photo; and after one save it was perhaps 199,950 colors; in the next subsequent save it was 200,020 colors; then 200,150; then 199,980; etc. There wasn't any great differences, and nothing like it was losing (or gaining) the number of colors consistently each time.

                          As for any easily noticeable image loss, I could not see any. Maybe some of the image was different, but when you blow up a JPG to the point where you see individual pixels, and trying to discern which fuzzy edge was any better or worse that the other, well, I would not want to take bets.
                          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


                            #14
                            Thanks ChuckE for your experiment. You've convinced me that my fear was not so evident.
                            This probably means that IV decompresses a file before reading, and then, saving, will be compressed again.
                            Although Bhikkhu's remark about the numbers of colors used still point to some tiny change.

                            I don't agree about the useless BMP format. It may be the biggest, but for archiving purposes it's the most
                            pure format of the image, just a serial description of the pixels.
                            Even lossless conversion needs a proper algoritm to be present.
                            0.6180339887
                            Rest In Peace, Sam!

                            Comment


                              #15
                              Hi everyone,
                              I thought that saving jpeg at 80% quality was roughly equivalent to saving with the same quality level of the image you opened. When I have opened an image and then saved again at 100% jpeg quality, the file size has gone up as much as 2x. In fact I just tried again with an original small 2Mp digi-pic, jpeg file size 350Kb, and saving back using "save as" at 100%, I get 777Kb, and saving at 80% I get 228Kb. To get about the same file size, I need to save at about 93%.
                              How come? What am I missing here? Is it that Irfanview opens the file at LESS THAN100% to start with? How come 100% produces such a huge increase?
                              When I have resampled images from my larger 5Mp camera and reduced to usable web posting size, I have lately been using a jpeg quality setting of 90% when saving, which has given acceptable file sizes for posting to websites.
                              Sorry if I'm being dumb!
                              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

                              Working...
                              X