Announcement

Collapse
No announcement yet.

wrong background with 16bpp grayscale+alpha PNG

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

    Fixed wrong background with 16bpp grayscale+alpha PNG

    IV 4.38 uses a black background instead of transparent (ie 'main window color' from the settings) or white (from bKGD chunk of picture).

    Picture:


    IV 4.56 32-bit

    #2
    You can change the main window colour as the background for viewing transparent images in Properties, Viewing, but IrfanView cannot display a transparency grid.

    So this is not a bug, unless I have misunderstood something.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      I have a gray background, but the IV uses black:
      IV 4.56 32-bit

      Comment


        #4
        This image has a grey transparent background. It displays as expected in IrfanView with whatever main window colour I choose.
        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
          Try a picture from the first post: http://ipic.su/img/img7/fs/174.1411162226.png
          IV 4.56 32-bit

          Comment


            #6
            I assume that you have a 16bpp grayscale alpha layer as well as a grayscale image. If so then you are probably correct, Irfanview does not appear to support it. You can see how it renders the alpha channel by selecting Show Channel > Alpha from the Image menu. I expected to see the "174" in white (opaque) and all the rest black (transparent). It is a bit messy but I suppose that is basically what it is.
            Looking at the image icon on my desktop, I can see the "174" clearly on the coloured background of the desktop. There are a lot of random white spots there as well, which makes me think that the messy alpha layer I see in Irfanview is probably genuine.

            I tried displaying your image in Zoner and Photofiltre and could see the "174" fairly clearly in black but it is too small to see any white speckle on the black and white check background that represents the transparent area.

            However it looks as though Irfanview probably renders the transparent area in solid black with no sign of the window color showing through at all. So all you see is the random white speckle.
            A 24 bpp trucolor alpha layer seems to work OK in Irfanview though.

            Comment


              #7
              Originally posted by Mij View Post
              Show Channel > Alpha from the Image menu. I expected to see the "174" in white (opaque)
              IV 4.56 32-bit

              Comment


                #8
                So, I think I can close this as not a bug, since IrfanView is not designed to fully support 32-bit Alpha transparency.

                If you disagree, please contact Irfan Skiljan with your report and let us know his response. I don't understand why this image would be expected to display properly.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment


                  #9
                  Identify from ImageMagick says
                  Channel depth:
                  gray: 16-bit
                  alpha: 8-bit
                  Where you get 32-bit alpha?
                  IV 4.56 32-bit

                  Comment


                    #10
                    32-bit or 8-bit makes no difference — IrfanView does not fully support alpha-transparency, only single bit palette transparency.
                    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                    Comment


                      #11
                      No. Leave it open for the moment please, Bhikkhu. Something seems to have changed in 4.38 and I would like to look into it a bit further. Irfanview does support opening 32 bit png files which have an 8-bit grayscale alpha layer. It has done so for a while. I have several images in that form and they still work fine.

                      It also had the ability, a year ago, to save images in that form although the feature was rather limited in scope because the only alpha layer you could create appeared to be derived from the luminance level of the image itself. I did find a few uses though.

                      Now in 4.38 I find I cannot do that. I can only create in Irfanview an alpha layer by selecting a transparent colour. It means that I cannot create an image to test what the OP is reporting because I do not know when I re-open it whether the transparency I see is based on the alpha layer or on the transparent colour I was forced to select.

                      I will try to work out and report on what I find later today.

                      Comment


                        #12
                        My mistake. Nothing has changed. In fact you have never been able to save an alpha layer from Irfanview without saving a transparent color as well. So I have now created a png file in Irfanview with an 8bpp grayscale alpha layer and can report that there is no problem when that is displayed.

                        In order to clearly see the transparency due to the alpha layer I added a vignette effect around the number "174" on a larger version of the OP's image. If you want to know how the vignette is created have a look at my Technical document post on Frames and Borders here. The result is the first image below which I saved as a grayscale jpg file.

                        I then saved again as a png file with alpha layer. To do that check the first two boxes of the PNG save options - Save Transparent Color and Save Transparency as Alpha channel. When asked to click on the Transparent color choose the pure white close to or between the numbers. The result is the second of the images below.

                        Before opening that file again I made sure that the Show PNG alpha/transparent color box was checked and selected a pale blue main window color from the Viewing Tab of the options (see the third image). That all seems to work as expected. So any problems must I think be associated with your HDR image with 16bpp grayscale alpha layer that Irfanview has never claimed to be able to handle. I am actually rather surprised that Zoner and Photofiltre can.
                        Attached Files

                        Comment


                          #13
                          Originally posted by Bhikkhu Pesala View Post
                          contact Irfan Skiljan
                          He does not read forum?

                          Originally posted by Bhikkhu Pesala View Post
                          32-bit or 8-bit makes no difference
                          This is ridiculous!

                          IrfanView does not fully support alpha-transparency, only single bit palette transparency.
                          Of course it supports a full alpha channel!








                          More samples with wrong background, who other programs displays correctly::



                          IV 4.56 32-bit

                          Comment


                            #14
                            Originally posted by RottenImp View Post
                            He does not read forum?
                            Not that I know of.
                            Originally posted by RottenImp View Post
                            This is ridiculous!

                            Of course it supports a full alpha channel!
                            That's not what I said. I said that it does not fully support alpha channels. Mij seems to agree with me:
                            Originally posted by Mij
                            So any problems must I think be associated with your HDR image with 16bpp grayscale alpha layer that Irfanview has never claimed to be able to handle. I am actually rather surprised that Zoner and Photofiltre can.
                            The best thing is to send the files to Ifan Skiljan, telling him how you produced them, as he will clearly understand better what IrfanView should support and what it does not. As I said in the sticky thread:
                            Originally posted by Bhikkhu Pesala
                            Irfan doesn't visit the site AFAIK, but you never know.

                            Bug reports often turn out not to be bugs at all — just user error. After a bug is confirmed by another user the thread title is changed to "Confirmed," then someone (anyone, it doesn't have to be a moderator, but might be the bug reporter) can forward it to Irfan. Then the thread prefix is changed to "Forwarded." When Irfan replies, the thread prefix will be changed to "pending" or "fixed" if a patch is already available, or it might be changed to "No bug" if its working as designed.

                            The general idea is to filter out vague bug reports and clarify feature requests, so that we don't overload Irfan with emails to deal with.
                            All we can do here is to confirm your results. If Irfan admits that it is a bug and not just an unsupported feature, please let us know and I will change the thread's status.

                            I leave it open so that anyone who does fully understand the issues can reply. We are just users here (though there are a few plug-in developers who also post here).
                            Last edited by Bhikkhu Pesala; 22.09.2014, 05:20 AM.
                            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                            Comment


                              #15
                              It does look as though there is a bug because if you open the image the "other" way it works OK.

                              1. Create a canvas of the same size as the 174 png image with a suitable color background from the Image menu
                              2. Add the 174.png image to it as an overlay from the Edit menu

                              I would think that if it opens OK as an overlay then it should also do so when you open it normally.
                              Attached Files

                              Comment

                              Working...
                              X