1.7.2: PNG to BMP conversion fails

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Fleet Command
Posts: 8
Joined: Tue Sep 21, 2021 6:23 pm

1.7.2: PNG to BMP conversion fails

Post by Fleet Command »

XnView MP: 1.7.2 x64
OS: Windows 10 v22H2 x64

I need to convert a PNG file to BMP. XnView MP has no trouble converting this file to any other format. The result is satisfactory. Depending on the format, XnView MP may add a white background or downgrade colors a little, but the result is always satisfactory, except when the target is BMP. In the case of the BMP, the target image is corrupted.

To reproduce:
1. Extract the PNG file I've attached
2. Open XnView MP
3. Right-click my PNG file and select Batch Convert...
4. On the output tab, set the format to BMP.
5. Click the Convert button.

Actual behavior (bug): XnView MP generates a 9.76 MB file that has lost its alpha channel (transparency). This image has a hideous black background and some of its colors are lost. Most Microsoft Windows apps cannot open this file.

Expected behavior: I expect a 19.52 MB file that looks exactly like my PNG file, bit by bit. Please note that the BMP format supports 32-bit color pixels (24-bit color plus transparency) exactly like PNG.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 44746
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 1.7.2: PNG to BMP conversion fails

Post by xnview »

i can't reproduce, do you have actions in 'batch convert'?
Pierre.
User avatar
user0
XnThusiast
Posts: 1956
Joined: Sat May 09, 2015 9:37 am

Re: 1.7.2: PNG to BMP conversion fails

Post by user0 »

Fleet Command wrote: Sat Aug 31, 2024 4:59 am Actual behavior (bug): XnView MP generates a 9.76 MB file that has lost its alpha channel (transparency). This image has a hideous black background and some of its colors are lost. Most Microsoft Windows apps cannot open this file.
there are 2 bmp formats available:
1. BMP - Windows Bitmap
2. BMP - Windows Bitmap RGB565

make sure you use the 1st one
Fleet Command
Posts: 8
Joined: Tue Sep 21, 2021 6:23 pm

Re: 1.7.2: PNG to BMP conversion fails

Post by Fleet Command »

xnview wrote: Sat Aug 31, 2024 7:26 am i can't reproduce, do you have actions in 'batch convert'?
Thank you. I've reinstalled the app and deleted my xnview.ini. The problem has gone away.
user0 wrote: Sat Aug 31, 2024 7:31 am there are 2 bmp formats available:
1. BMP - Windows Bitmap
2. BMP - Windows Bitmap RGB565

make sure you use the 1st one
Oh, you think I haven't tried both, don't you? I have tried everything! And when I say everything, I mean:
Untitled.jpg
You do not have the required permissions to view the files attached to this post.