Announcement

Collapse
No announcement yet.

jpeg quality / compression limit?

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

    jpeg quality / compression limit?

    Churning out my own thumbnails from jpgs (using batch/resize/set long side=128pixels), I'd like to get them down around 5kB to accelerate download. Photoed.exe gets there with quality in the range 50-75%. I can turn down Irfanview jpeg/options/save quality as low as I like, but they're still around 40kB. Have I missed a button?

    #2
    You must be looking at the wrong images. There is no problem at all in getting a thumbnail of that size down below 40 Kbytes.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      jpeg quality / compression limit?

      My first assumption was that it was my mistake, and remains so. But I've just tested a sample that was generated with save quality = 30% and weighed in at 44kB. When I use Photoed.exe to do the same resize and save with 100% quality it only takes 16kB, whilst at 50% it's down to 3kB. When I use Photoed.exe to open the 44kB file and save it at 100% quality that yields 9kB.
      In Irfanview under the output format options for jpeg everything is set except progressive, grayscale and subsampling. I have the Jpg_transform.dll plug-in.
      Examining the images, I have the vague impression that the Irfanview files have a more populous colour palette.

      Comment


        #4
        Do you have an original file we can try.

        The attached file was a PNG with a long side of 320 pixels saved as JPG at a fairly high 75 quality setting. The resulting file is just 15 Kbytes, so I don't understand how a 128 pixel image is coming close to 40 Kbytes.
        Attached Files
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          I would guess that your images are not 128px, but rather still the original size. Perhaps you are not performing the resize correctly, but still converting the images resulting in very large file sizes. If you used batch conversion, you must have missed some setting. I would open one of your converted files and verify in the status bar that the dimensions are correct. If all is still correct, try resizing a single image in IrfanView and saving it to see how it comes out.

          If you upgrade to 4.2, you can use the RIOT-Radical Image Optimization Tool plugin to save for web or compress to a particular size. You can see what the expected file size will be before you save.

          Comment


            #6
            I can confirm those file sizes that Bhikkhu Pesala reports as being typical.

            Check that you are not trying to save EXIF or other data with the jpg. (Tick "Show options dialog" at the bottom of the Save/Save as window if you have not already done so). My EXIF data adds about 14KB to file size but it will vary according to camera.

            Comment


              #7
              jpeg quality / compression limit?

              Thanks guys. I won't bother the system with the large original source jpg (2560x1920, 1.9MB), but I've attached the Batch conversion + rename result (128x96 and looking rough). If I manually open the original source file, resize to 128 (whether on the default setting Lanczos or fast option) and save with 50% quality and the same settings as mentioned earlier (or with colour subsampling disabled) I get a ~46kB file. There must be a setting somewhere that I've missed.
              Attached Files

              Comment


                #8
                Mij might be right. Even the uncompressed size is a mere 36KB, so for the jpg to be bigger is quite unbelievable. You must be saving a lot of extraneous info in the file. So, try to not save with any. If somehow that still isn't it, go ahead and upload the source to the web or the forum and we'll take a deeper look...

                Comment


                  #9
                  Yes, your file has EXIF data included. Just open that Show Options dialog and uncheck Keep original EXIF data, IPTC data and JPG comment boxes.
                  I resaved at 100% quality and it was less than 8KB.
                  Attached Files

                  Comment


                    #10
                    thumbnail compression

                    Thanks guys, just unticking "keep original EXIF data" dropped it to 4kB at 50%. Surprising really, if you open Image/Information/EXIF info and assume the tag names aren't stored but the values are as the visible text (some is visible in the binary file), you'd only have about 0.5kB.
                    Incidentally, it transpires that Photoed.exe deletes the EXIF info by default.

                    Comment


                      #11
                      The EXIF data includes an embedded thumbnail of the image. Irfanview does not display it but other programs do. That accounts for another 19KB but there is clearly still more lurking in there.

                      Comment

                      Working...
                      X