Announcement

Collapse
No announcement yet.

quality loss in IrfanView's lossless conversions?

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

    quality loss in IrfanView's lossless conversions?

    Probably the most important measurement for ANY Image Viewer or Image Converter is its RELIABILITY, i.e. that images are displayed 100% accurately and that losless conversions are indeed 100% losless/accurate.

    I was therefore very concerned, when I came across this problem:

    Original image file (JPEG):




    Image after losless conversion to PNG with IrfanView 4.20:




    I used Photoshop to examine the differences. Open one image and add the second image as a new layer over it with blend mode = difference. Use magic wand tool, with tolerance=zero. Expected results: entirely black image. Actual esults (white filled selection):



    Merge both layers, invert the colors and you see the differences between the images. I applied a curves adjustment to exaggerate the differences:



    Again, this time you should see an entirely white image, if both images were identical.

    It seems as though there were a problem with IrfanView's conversion. Any idea what happened ?

    #2
    Re: Lossless conversion

    Have you paid attention to the default conversion level on JPEG, which is 80%. In addition, it is not necessarily possible to do a lossless conversion from one format to another, as in this case. PNG is a lossless storage method, and JPEG is not in most cases. It is mostly possible to do lossless operations such as rotation and inversion in JPEG, but it doesn't keep everything from whatever orignal format the picture came from. The only true way to have absolute lossless storage is to use one or more of the RAW storage methods. Also, PNG is not a scalable format to the same degree that JPEG is, though JPEG isn't that great at scaling, either. So, you have to make sure that your differential is done without any scaling of the original image. Even very slight scaling can throw the differential off. The problem is that you are really not comparing apples to apples when you do the differential. You are comparing the derived pixel set from one format with the derived pixel set from the other format. Even slight changes in the way this is handled between programs will result in a considerable differential that is an artifact of the program rather than the image. In other words, you are seeking something that never was and never will be.

    I downloaded your images and displayed both at full screen, jogging back and forth between the two using irfanview, and can find no visual differences. I believe that you are assuming that Photoshop is without errors, and there is no reason to make that assumption.

    Comment


      #3
      I saved your JPG, opened it and saved it as PNG. The resulting image had exactly the same number of colours as the JPG image.

      So I wonder how you did your "lossless" conversion to PNG?
      Last edited by Bhikkhu Pesala; 02.12.2008, 10:03 PM.
      Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

      Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

      Comment


        #4
        Originally posted by rarchimedes View Post
        Have you paid attention to the default conversion level on JPEG, which is 80%.
        I'd kindly ask you to read the posting again. I didn't do a conversion TO jpeg, therefore the default jpeg conversion level in IrfanView is irrelevant.

        In addition, it is not necessarily possible to do a lossless conversion from one format to another, as in this case.
        What does this sentence mean ??

        ... to do lossless operations such as rotation and inversion in JPEG, but it doesn't keep everything from whatever orignal format the picture came from.
        In this example, the .jpeg file IS the original source file.

        The only true way to have absolute lossless storage is to use one or more of the RAW storage methods.
        Lossless in relation to which reference ? To what the digital camera "sees" ? You are way off-topic here...

        Also, PNG is not a scalable format to the same degree that JPEG is, though JPEG isn't that great at scaling, either. So, you have to make sure that your differential is done without any scaling of the original image.
        What "scaling" are you talking about here ?

        Even very slight scaling can throw the differential off. The problem is that you are really not comparing apples to apples when you do the differential. You are comparing the derived pixel set from one format with the derived pixel set from the other format. Even slight changes in the way this is handled between programs will result in a considerable differential that is an artifact of the program rather than the image. In other words, you are seeking something that never was and never will be.
        your post doesn't make any sense to me at all.

        I downloaded your images and displayed both at full screen, jogging back and forth between the two using irfanview, and can find no visual differences. I believe that you are assuming that Photoshop is without errors, and there is no reason to make that assumption.
        OK, I was afraid, I would be critizing your whole post, but here comes the good news .... with your last remarks you are .... TADAAA ...... absolutely right !!! There are no differences at all between the first two images. All pixels are 100% identical. Yes, I used Photoshop to compare these identical images and found them to be different. As a consequence, technically there is no other explanation than one of the two programs - either Photoshop or Irfanview - has a flawed jpeg-DECODING-method. Because the .jpeg specifications are established exactly enough that there is exactly and only one image that can be generated correctly based on a .jpeg file on the harddisk. (There is a second explanation, namely differences in color management and ICC profiles, but I took the necessary steps to rule that out).

        So when I had to choose to trust either the program of a single hobby-programmer or the world's leading professional image editing software written by >50 programmers who - all - would have had to overlook this problem ... I admit I didn't think a lot before making up my mind.

        But it turns out, I was all wrong ... I tried 3 other programs, and all of them produce exactly the same BMP file. So with IrfanView, it's 4 programs. None generated the BMP file that Photoshop produced.

        I therefore started a thread over there at Adobeforums, and so far noone has found an answer (you can skip-read the first postings as they were a bit confused):



        It might well be that Photoshop has problems with JPEG-decoding.
        Last edited by boarder's paradise; 04.12.2008, 11:54 AM.

        Comment


          #5
          Originally posted by Bhikkhu Pesala View Post
          I saved your JPG, opened it and saved it as PNG. The resulting image had exactly the same number of colours as the JPG image.
          Same number of colours is not a proof for all image pixels having exactly the same RGB values.

          So I wonder how you did your "lossless" conversion to PNG?
          Conversions TO png are always lossless, as PNG is a lossless format (at least if you don't reduce the bit-depth during the conversion).

          Comment


            #6
            I consider Photoshop's JPEG-decoding suspect. Industry acceptance does not guarantee credibility. Irfan has a high standard for accuracy and this clearly shows it. This is the power of IrfanView!

            I tried looking at the JPG in Photoshop Elements and it does show problems. Some of the pixels are apparently incorrect, but interestingly nowhere near as bad as yours. (Recalling your desaturation issue with Photoshop, I remember IrfanView and Elements seemed better, too.)

            My minimal observations of the blue at the bottom left revealed incorrect color. I decided to compare the three pixels going up from the bottom in Firefox, IrfanView, and Elements. First pixel was the problem in Adobe with RGB (36,97,180), but FF and IV had (49,95,157). That is ridiculous. Second pixel was identical in all three (34,95,178), and so was the third (38,96,178). Adobe seems to have a problem with that first row, but after that it is good for the most part. Generating a BMP from the JPG in IV revealed correct color when viewed in Adobe for the first pixel.

            Now maybe there is something we aren't accounting for, but it doesn't seem so. These are complex issues to diagnose and understand after all. Have you tried any Photoshop competitors to compare with?

            While I agree this is troubling, obviously there is little you can do. Have you reported it to Adobe? Is it really noticeable to you or your intended audience? Why the need for this extreme quality? I think it is a wonder all this technology works at all. Would you like to go back to film?

            Comment


              #7
              Originally posted by Skippybox View Post
              I consider Photoshop's JPEG-decoding suspect. Industry acceptance does not guarantee credibility. Irfan has a high standard for accuracy and this clearly shows it. This is the power of IrfanView!
              As far as I can see now, I fully agree !

              I tried looking at the JPG in Photoshop Elements and it does show problems. Some of the pixels are apparently incorrect, but interestingly nowhere near as bad as yours.
              thanks for looking into that!

              (Recalling your desaturation issue with Photoshop, I remember IrfanView and Elements seemed better, too.)
              yes, of course. Irfan mailed me the settings IV uses and when entering the settings in Photoshop, I get exactly the same desaturation results that I get with IV. It's just that the default values are visually less appealing than IV's values ...

              My minimal observations of the blue at the bottom left revealed incorrect color. I decided to compare the three pixels going up from the bottom in Firefox, IrfanView, and Elements. First pixel was the problem in Adobe with RGB (36,97,180), but FF and IV had (49,95,157). That is ridiculous. Second pixel was identical in all three (34,95,178), and so was the third (38,96,178). Adobe seems to have a problem with that first row, but after that it is good for the most part. Generating a BMP from the JPG in IV revealed correct color when viewed in Adobe for the first pixel.
              Thanks for confirming these issues.

              Now maybe there is something we aren't accounting for, but it doesn't seem so.
              The only thing which would come to my mind is color management. But as explained in the link I posted above, I took all the necessary steps, to neutralize this issue.

              These are complex issues to diagnose and understand after all. Have you tried any Photoshop competitors to compare with?
              As I said above, I tried 4 programs (including IV) that yield 100% identical results. Only Photoshop is different. I mentioned the programs and version numbers over the at Adobeforums.

              While I agree this is troubling, obviously there is little you can do. Have you reported it to Adobe?
              Yes, in the link above:


              Is it really noticeable to you or your intended audience?
              No it isn't noticeable to me. I just sat at my computer and all of a sudden I heard God's voice, telling me to write this thread ....
              Just kidding ... no, the differences are hard to see visually.

              Why the need for this extreme quality? I think it is a wonder all this technology works at all. Would you like to go back to film?
              jepg-decoding isn't rocket science. If even the most basic and laughed-about image editor can decode jpegs correctly, Photoshop should be ashamed. It is a matter of principle. You can accept differences, etc. if you know why they happen and can estimate their impact, generational loss, etc. But if all of a sudden a program gets a life on its own and does things nobody can explain, you just cannot trust it to do color-critical work.
              And again, it's not difficult. IrfanView, ImageMagick, www.media-convert.com, and Microsoft Paint (yes!) all do jpeg-decoding correctly and produce 100% identical images, i.e. all of the pixels in the image have exactly the same RGB values. Why would Photoshop produce other RGB values ...

              Comment


                #8
                ImageMagick reports 109817 different pixels out of a total of 250800, that's more than 43% (!!!) of pixels that are different in Photoshop when compared to ALL 4 other programs I tested (which yield identical results).

                ImageMagick also produces a visual representation of the differences. The red pixels are those that are different:



                (It's the same as my black-and-white image above, just with a faded image background for orientation purposes)
                Last edited by boarder's paradise; 04.12.2008, 09:11 PM.

                Comment


                  #9
                  And Skippybox, how exactly did you do the pixel value comparisons? Did you extremely zoom into the image .... ? Please explain

                  Comment


                    #10
                    Originally posted by boarder's paradise View Post
                    As I said above, I tried 4 programs (including IV) that yield 100% identical results. Only Photoshop is different. I mentioned the programs and version numbers over the at Adobeforums.
                    Actually, below for me. I'm sure it's enough, I was just wondering how GIMP or Paint.NET might do. Adobe has caused problems for me as well, with Adobe Reader causing other programs, like Notepad or IrfanView to actually crash!

                    You posted in a forum, I meant a formal support request.

                    If even the most basic and laughed-about image editor can decode jpegs correctly, Photoshop should be ashamed.
                    Yes.

                    Originally posted by boarder's paradise View Post
                    ImageMagick reports 109817 different pixels out of a total of 250800, that's more than 43% (!!!) of pixels that are different in Photoshop when compared to ALL 4 other programs I tested (which yield identical results).
                    Mine probably is just as bad, the closer I look.

                    Originally posted by boarder's paradise View Post
                    And Skippybox, how exactly did you do the pixel value comparisons? Did you extremely zoom into the image .... ? Please explain
                    I just used another program's color picker, which does have a magnified viewer to assist in accurate selection. Adobe's color picker agreed.

                    Keep pursuing, but I recommend directing your concerns to people that care, instead of other Adobe users. That is, program authors, or people that can actually do something about it.

                    Comment


                      #11
                      This is a very good idea. Didn't think of it. (Don't ask me why ... sometimes I have blond moments ... ) I will definitely do that ...

                      But if anybody here has additional informations/ideas, please don't hesitate ...

                      Comment


                        #12
                        An important call to everyone here: If you have a program that can open a JPEG file and save it as BMP file, you can do me a very big favour: Please open the very first image I posted in this thread (JPEG image), open it in your program, save it as BMP and then add it to your forum post as an attachment. I already have BMP files gathered from Photoshop CS3, ImageMagick, IrfanView, Microsoft Paint and the online conversion tool at media-convert.com. But if you have any other program than those installed on your computer, it would be an enormous help for me. PaintShopPro or Photoshop CS4 and Gimp would be cool, but really any program is fine! Thanks in advance, I would be very thankful for your help.

                        PS: please don't embed full size images into this thread here (as they are visually identical to the above), but only thumbnail links or text links. thanks.
                        Last edited by boarder's paradise; 06.12.2008, 03:29 AM.

                        Comment


                          #13
                          It is scary at the Adobe forum! You should find somebody who knows the JPG standard. Might try Lucian Sabo first, but he probably isn't the expert you need. You do have to decide when to give up on this though, as in the long run will it be worth it? How much effort are you willing to put in, and how much are you willing to put up with!

                          Anyway, here are a few BMPs.
                          Attached Files

                          Comment


                            #14
                            Yes, Skippybox. Did you read some of the posts there? Most of them talk nonsense, but they are all pickin' on me who is just trying to find some things out ... Seems they look at Photoshop as some Holy Cow nobody has the right to touch ... The problem is, that at the same time, the only place where Photoshop-Experts hang out, is that forum it seems ...

                            Yes Lucian Sabo would be a wonderful help for this. And especially for this thread, because unfortunately the story continues .... :




                            And thanks so much for posting these BMPs, Skippybox, "you are gold" !!! He, he, I'm gonna throw them at those Adobeforum-guys and see what excuses they find this time, LOL ...
                            Last edited by boarder's paradise; 06.12.2008, 01:07 AM.

                            Comment


                              #15
                              OK, I tested your images, Skippybox. They are all identical to the conversion IV does ... that was a bit expected. And guess which file is completely different .... ??
                              TADAAAAAA .... Photoshop Elements !

                              But Ulead Photo Explorer's file is different, too. And by a longshot! Even considerably more different than Photoshop + Elements. Is it possible, that Ulead Photo Explorer has color management and it doesn't treat the image as sRGB ?

                              Comment

                              Working...
                              X