Announcement

Collapse
No announcement yet.

include Compression Ratio to Irfanview picture Info ?

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

    Requested include Compression Ratio to Irfanview picture Info ?

    (recently Registered Irfanview and created forum account just for this feature request)

    Could you include Compression Ratio to Irfanview picture Info?
    Sometimes quite useful to know, I still use ancient ACDsee only for that.
    Demo picture from ACDsee "Image properties":
    Click image for larger version

Name:	example.png
Views:	1
Size:	19.6 KB
ID:	84783
    Original photo:

    #2
    It's already shown in the JPG Image information when you open a JPG in IrfanView.

    When saving JPG images, there's an option to try to use this compression ratio/quality and to ignore the value currently set on the slider.
    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


      #3
      Jpeg Quality setting is NOT same thing as image compression ratio. Nope - those are totally different properties and counted differently.
      Last edited by Tiikeri; 10.06.2016, 03:06 PM.

      Comment


        #4
        I see what you mean now, but why do you need this?
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          When I open the JPG in IrfanView the compression/quality is estimated as 100 (highest quality), but the image has a lot of artefacts. The compression ratio that you see in ACDsee is compares the size in RAM to the size on disk.

          Images like this should be saved using PNG format. After brushing it over with the colour replacer and saving it as 8-bit PNG, the file is smaller and a lot sharper.
          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


            #6
            But isn't the quality (info about opened jpg image) tag set different by different programs?

            I mean If I save a JPG file and say 90% quality, I'll still have other options that will cause the final file size to radically different. Also, even if you would store jpg files only with quality 90%, the file would still be unequal if saved by a different program, such as Gimp.

            Isn't it possible to achieve by viewing files in full screen?

            [pause while reading IV help file]
            Yess I have the solution for you, thread starter. Under full screen options you can add this:
            Originally posted by Irfanview help file
            $B - image bits per pixel
            I mean - that must be the most precise measurement of file size compared to image size in memory when loaded. I's just not presented as percentages.
            If it hurts not to drint, don't waste the bottle then.

            Comment


              #7
              Originally posted by Sprintdriver View Post
              I mean - that must be the most precise measurement of file size compared to image size in memory when loaded. I's just not presented as percentages.
              It has nothing to do with file size. $B is the bit depth, which is 24-bit for JPG images.

              What Tikeri is requesting is the ratio of file size in RAM to file size in disk These are in bytes or kbytes, not bits. I am still trying to think of a use for this.
              Last edited by Bhikkhu Pesala; 11.06.2016, 02:00 PM.
              Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

              Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

              Comment


                #8
                Ok I got the impression that this was the average numbers of bits used to describe each pixel. I was wrong, sorry.

                The I guess it can't be done properly in IV.
                If it hurts not to drint, don't waste the bottle then.

                Comment


                  #9
                  Because sometimes it's good to know whether claimed compression ratio is really what used software actually produces.
                  Compression Ratio is format-independent number, nothing to do with any particular file format.
                  It's simple calculation and I assume that it's very easy to add.
                  ResolutionX * ResolutionY * bit-depth / divide that with real size of image.
                  For example:
                  2000 pixels * 2000 pixels * 24bit(3*RGB) = 12.000.000 bytes
                  If PNG-version of that image is 2.500.000 bytes, image Compression Ratio would be 4,8.
                  And remember to count bit-depth, because you have to count possible alpha-channel too.
                  And some programs/scanners can produce 48-bit images (I don't know if Irfanview can read those).

                  I bet Irfan knows what I'm asking. Just relay my request forward and he decides?
                  Last edited by Tiikeri; 11.06.2016, 05:48 PM.

                  Comment


                    #10
                    Originally posted by Tiikeri View Post
                    I bet Irfan knows what I'm asking. Just relay my request forward and he decides?
                    Thanks for your patience. Anyone can send suggestions to Irfan Skiljan, see Help, About. His Home Page says:

                    • Any suggestions, feedback and comments are welcome and won't be ignored.

                    Here too, I have not ignored your request, but I still don't see the point of it.

                    Please let us know what he says and I will update the thread

                    How the Feature Request forum works.
                    Last edited by Bhikkhu Pesala; 11.06.2016, 07:27 PM.
                    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                    Comment


                      #11
                      Originally posted by Tiikeri View Post
                      ...
                      It's simple calculation and I assume that it's very easy to add.
                      ResolutionX * ResolutionY * bit-depth / divide that with real size of image.
                      ....
                      And remember to count bit-depth, because you have to count possible alpha-channel too.
                      And some programs/scanners can produce 48-bit images (I don't know if Irfanview can read those).
                      .....
                      You already have most of that in the Information dialog, Tiikeri. It is just
                      Current Memory size / Disk size

                      You can find those values on the Status bar at the bottom of the Irfanview window also, without even opening the Information dialog.
                      All you are asking is for Irfan to do the division sum for you.

                      Irfanview does not display 48-bit images nor Alpha layers though. The image is always 24-bit (or less). You can open 32-bit images with an Alpha layer, but the alpha layer is applied directly and displayed as a "flattened" image of 24 bits.

                      As an example I have attached the Information dialog for a PNG image with an Alpha layer that I used in my Borders and Frames thread in the Technical Documents section of the Forum. The BPP of the Original and the Currently displayed image can be seen in the Original colors and Current colors boxes.

                      In this example the compression is 5,760,040 / 619,289 or 5.49 x 1024 / 604.77 if you use the MB and KB figures. Either way it is 9.3
                      Attached Files

                      Comment


                        #12
                        Originally posted by Mij View Post
                        In this example the compression is 5,760,040 / 619,289 or 5.49 x 1024 / 604.77 if you use the MB and KB figures. Either way it is 9.3
                        So, in this case, the reported compression would be incorrect because the image on disk is 32-bit, not 24-bit like the one in RAM. I suspect that ACDsee will support 32-bit images, so won't have this issue.
                        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
                          So, in this case, the reported compression would be incorrect because the image on disk is 32-bit, not 24-bit like the one in RAM. I suspect that ACDsee will support 32-bit images, so won't have this issue.
                          Yes, you are right. Calculating the compression this way is only correct if the image has not been edited. It is a property of the image only at the time it was opened. If you edit the image size or the Bits Per Pixel the reported "Current Memory Size" changes but the "Disk size" stays the same and the calculation of compression is meaningless.

                          In the case of an image with an Alpha layer, it is edited automatically before displaying to incorporate the effect of the alpha layer onto the RGB ones and the alpha layer is then discarded. So the required Current memory size is never displayed. It has to be calculated from the figures for the original image size and BPP.

                          Comment


                            #14
                            Hi all,

                            I was wondering if someone can tell me how Irfanview calculates the JPG Quality (Compression textbox in File Information).

                            The formula I use is :
                            file size in memory = width x height x bit-depth x channels / 8 .
                            quality = 100 ( 1 / file size in memory / file size on disk )

                            For a lot of pictures, the formula I used yields the same result as Irfanview, but for some older pictures, I get really different results.

                            Thank you

                            Comment


                              #15
                              The quality is a property of the opened image. The JPEG encoding reduces accuracy of image pixels by dividing or quantizing their values. Smaller numbers compress better. This is done after a frequency transform, higher spatial frequencies (detail) are quantized more than low frequencies (average brightness), color is quantized more than brightness. The quality scale is a function for picking the quantization values, from one to maximum. It may be different among encoders. The chosen divisors, whatever they may be, are recorded in the picture file, and applied to reconstruct an approximation of the original image.

                              IrfanView compares the quantization tables in the image against the ones that come with the JPEG encoding libary in it, and reports the closest match.

                              The amount of compression obtained on a given quality level depends on the initial complexity of the image. Flat areas of same brightness, low amount of noise, less vibrant colors, previous encoding generation at a low quality setting (even if current setting is high), will make the compressed file smaller.

                              Comment

                              Working...
                              X