If you change the screen size, the background color changes

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

If you change the screen size, the background color changes

Post 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
Last edited by c627627 on Mon Dec 19, 2016 10:27 pm, edited 2 times in total.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post 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?
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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)
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post 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
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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...?
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post by c627627 »

Image > Resize

Before and after screen shots:
Before.png
After.png
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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.
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post 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?
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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.
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post 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?
c627627
Posts: 55
Joined: Fri Jun 26, 2009 5:00 am

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

Post by c627627 »

Thank you very much.
Post Reply