Transparent area missing after 8 bit converting

XnConvert Multi Platform - Windows, MacOSX, Linux
Post Reply
RooofTop
Posts: 4
Joined: Thu Jan 21, 2021 12:28 am

Transparent area missing after 8 bit converting

Post by RooofTop »

I have several .png images i want to resize to width 200 and color convert to 8 bit 256 colors - this to reduce file size for each image down to around 80 kB.
I want to do this with a batch tool like this.
Problem is that the transparent area/field or background is lost during conversion.

I spent a few hours reading the forum here. But none of the examples i have seen works for me. Or I am not doing it right.

Here is the image before conversion:

Image

And here it is after conversion:
(using resize to 200, and convert color depth to 256 colors)

Image

Maybe someone can point out what I need to do, to get the transparency back. As you can see the transparent area around the game-box
now has blocky fields of white and black.
Last edited by RooofTop on Thu Jan 21, 2021 12:10 pm, edited 1 time in total.
cday
XnThusiast
Posts: 2709
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Transparent area missing after 8 bit converting

Post by cday »

On the 'Change color depth' action do you have '32 bits' selected?

The output image is 24 bits rather than 32 bits, which should preserve the transparency in the original file.
RooofTop
Posts: 4
Joined: Thu Jan 21, 2021 12:28 am

Re: Transparent area missing after 8 bit converting

Post by RooofTop »

Here with 216 colors selected:
Image

This one with 32 bits selected:
Image

Both versions removes the transparency.

(the Resize function works fine stand-alone.)

I want to reduce file size for these images down to 50-80 kB.
cday
XnThusiast
Posts: 2709
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Transparent area missing after 8 bit converting

Post by cday »

RooofTop wrote: Thu Jan 21, 2021 12:38 am I have several .png images i want to resize to width 200 and color convert to 8 bit 256 colors - this to reduce file size for each image down to around 80 kB.
If you do not save the file at 32-bits you will inevitably lose transparency...

I don't know whether you can reduce the file size to around 80 kb as you wish, you can reduce the pixel dimensions as you are doing, and you can also reduce the number of colours provided the file remains a 32 bit file, assuming that is possible.

Edit:

Reducing the number of colours in the original image and selecting 32 bits changes part of the transparent area to black, as in your image above:

I don't understand what can be causing that, I'm no expert on transparency, but it seems as if the original image might be in some way defective...
cday
XnThusiast
Posts: 2709
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Transparent area missing after 8 bit converting

Post by cday »

Are you able to test the same image in another software, in case the issue is very unexpectedly in XnView software, I can't easily do that quickly?
RooofTop
Posts: 4
Joined: Thu Jan 21, 2021 12:28 am

Re: Transparent area missing after 8 bit converting

Post by RooofTop »

I will test with other software tonight.
cday
XnThusiast
Posts: 2709
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Transparent area missing after 8 bit converting

Post by cday »

I have booted into Windows :( and tested in another popular freeware software, and now filed a bug report under the XnView MP heading.

Very surprising if there is really what would presumably be a long standing bug in xnview software :?:.
RooofTop
Posts: 4
Joined: Thu Jan 21, 2021 12:28 am

Re: Transparent area missing after 8 bit converting

Post by RooofTop »

Oh, so it works with a different software ? Can you tell me what sort of software. PM or here.
cday
XnThusiast
Posts: 2709
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Transparent area missing after 8 bit converting

Post by cday »

RooofTop wrote: Thu Jan 21, 2021 2:17 pm Oh, so it works with a different software ? Can you tell me what sort of software. PM or here.
PM sent.
Post Reply