Page 1 of 1

1.7.2: PNG to BMP conversion fails

Posted: Sat Aug 31, 2024 4:59 am
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.

Re: 1.7.2: PNG to BMP conversion fails

Posted: Sat Aug 31, 2024 7:26 am
by xnview
i can't reproduce, do you have actions in 'batch convert'?

Re: 1.7.2: PNG to BMP conversion fails

Posted: Sat Aug 31, 2024 7:31 am
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

Re: 1.7.2: PNG to BMP conversion fails

Posted: Sat Aug 31, 2024 10:27 am
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