Page 1 of 1

If you change the screen size, the background color changes

Posted: Sun Dec 18, 2016 6:21 am
by c627627
If you change the screen size of this file in XnView 2.39 (latest version), the background immediately changes from transparent to black. Is this a bug?

EDIT: added original file:
rm850_sideview_a.png

Re: If you change the screen size, the background color chan

Posted: Sun Dec 18, 2016 8:30 am
by XnTriq
This is a known issue. Please increase the color depth (Image » 32 bits) prior to resizing.
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=133136#p133136]When Resizing Change Default Lanczos to Bilinear[/url]) wrote:When you resize a palette-based image with an algorithm other than Nearest Neighbor or Bilinear (i.e. Hermite, Gaussian, Bell, Bspline, Mitchell, Lanczos, or Hanning), transparency will only be preserved, if you convert it to alpha-channel transparency (Image » Change color depth... » 32 bits) first.

Related: Fichier .gif redimmensionnement et perte de la transparence

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 1:37 am
by c627627
Just wanted to tell you that XnView 2.39 > Image > 32-Bit is grayed out for this example image.

Other than opening it in another imaging program which does not have this issue, can I do anything else within XnView, since 32-Bit is grayed out?

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 3:15 am
by XnTriq
c627627 wrote:Just wanted to tell you that XnView 2.39 > Image > 32-Bit is grayed out for this example image.
Thanks for reporting back. Could you try the following configuration?
  • Tools » Options...
    • General » Operations » Ignore alpha channel = Off
    • Read/Write » Read » PNG » Parameters » Compose image with transparency = Off
    • Read/Write » Read » PNG » Parameters » Compose image with alpha (32bits) = Off
  • Viewer mode: View
    • Use transparent index (<=8bits) or alpha channel = On
    • Use alpha channel = On
    • Show Mask = Off
Test file: CorsairRM850.png (163'824 bytes, 800×555 pixels, 8 bits/pixel, “cheap alpha” transparency)

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 8:52 am
by c627627
As you can see, they were all already set as you instructed but this did not help.
1.png
2.png
3.png

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 4:00 pm
by XnTriq
c627627 wrote:As you can see, they were all already set as you instructed but this did not help.
Perhaps I misunderstood. When you say “change the screen size”, do you mean changing the screen resolution of your monitor/display or are we talking about Image » Resize...?

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 5:39 pm
by c627627
Image > Resize

Before and after screen shots:
Before.png
After.png

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 9:45 pm
by XnTriq
This is really weird :?
p136730.png
As you can see in the screenshot, Image » 32 bits isn't grayed out in my installation.

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 10:17 pm
by c627627
Resolved.

1. Go to original page:
http://www.corsair.com/en-us/rm-series- ... wer-supply

2. Right click on the power supply picture directly and save it to your computer.

3. Open it in XnView and before doing anything, go to XnView > Image > 32-Bits

Now it can be resized without a problem.


Why is this a requirement in XnView?

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 10:30 pm
by XnTriq
Thanks for your patience :-)
c627627 wrote:Why is this a requirement in XnView?
Certain PNGs…
  • 8-bit (indexed/paletted) with “cheap alpha” transparency
  • greyscale with alpha channel
… aren't (fully) supported by XnView's core library.

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 10:55 pm
by c627627
Is there an add-on to offer support?
Just out of curiosity what is the background for the lack of support for them?

Re: If you change the screen size, the background color chan

Posted: Mon Dec 19, 2016 11:30 pm
by XnTriq

Re: If you change the screen size, the background color chan

Posted: Tue Dec 20, 2016 12:12 am
by c627627
Thank you very much.