If you change the screen size, the background color changes

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

Moderators: XnTriq, xnview

c627627
Posts: 41
Joined: Fri Jun 26, 2009 5:00 am

If you change the screen size, the background color changes

Postby c627627 » Sun Dec 18, 2016 6:21 am

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: 4967
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Postby XnTriq » Sun Dec 18, 2016 8:30 am

This is a known issue. Please increase the color depth (Image » 32 bits) prior to resizing.

XnTriq (When Resizing Change Default Lanczos to Bilinear) 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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Mon Dec 19, 2016 1:37 am

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: 4967
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Postby XnTriq » Mon Dec 19, 2016 3:15 am

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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Mon Dec 19, 2016 8:52 am

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: 4967
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Postby XnTriq » Mon Dec 19, 2016 4:00 pm

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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Mon Dec 19, 2016 5:39 pm

Image > Resize

Before and after screen shots:

Before.png


After.png

User avatar
XnTriq
Moderator & Librarian
Posts: 4967
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Postby XnTriq » Mon Dec 19, 2016 9:45 pm

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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Mon Dec 19, 2016 10:17 pm

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: 4967
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Postby XnTriq » Mon Dec 19, 2016 10:30 pm

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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Mon Dec 19, 2016 10:55 pm

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: 41
Joined: Fri Jun 26, 2009 5:00 am

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

Postby c627627 » Tue Dec 20, 2016 12:12 am

Thank you very much.


Return to “Classic - Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest