Mass convert of bmp to png files with transparent background

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
Targens
Posts: 2
Joined: Sat Aug 06, 2016 7:53 pm

Mass convert of bmp to png files with transparent background

Post by Targens »

Hi,
I've tried to search through the forum, but I've failed to find the answer :/ ...

My goal:
I have several .bmp files (with black images and white background) and I want to convert them to png files where the backround (white) color is transparent.

What I'm doing:
1) Open XnView
2) Select all the bmp files with CTRL+A
3) Pressing CTR+U
4) Added Transformation > Conversion to binary color (only black & white) and changing the size (to height 100)
5) Went back to general tab
6) Set Format to PNG and went to it's options
7) Checked Set transparency to this color and entered value 1
8) Set compression level to 0 (that's no compression, right?)
9) Ok
10) Start
> PNG files are created, but the transparent color is the black not the white > so the transparent are the images, not the background

I've tried in step 7) to enter various values as 0, 255, FFFFFF, etc., but it always end up in transparent black color. If I also add to transformation Negativ map then the background is transparent, but the images are white and not black (I want them black). I've also tried various color conversion, not only binary and various values for transparency color... still the same result.

Am I'm doing it right?

Can anybody help please?

Thank you very much for your time!
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Mass convert of bmp to png files with transparent backgr

Post by XnTriq »

Welcome aboard, Targens (-:

I think you've found a bug.
As a workaround, you could batch-convert your input files to GIF format (Set transparency value to palette entry: 1) and then run those through PngOptimizer.

PS: Yes, PNG compression level 0 means no compression.
Targens
Posts: 2
Joined: Sat Aug 06, 2016 7:53 pm

Re: Mass convert of bmp to png files with transparent backgr

Post by Targens »

Thanks for the answer! And ah, okay. I'll figure it out :) .
Post Reply