In order to convert images of some alpha channels correctly.

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

Posts: 6
Joined: Tue Mar 01, 2016 5:56 am

In order to convert images of some alpha channels correctly.

Postby abobong » Mon Apr 03, 2017 5:41 am

test1.png (1.14 KiB) Viewed 327 times
test2.png (13.82 KiB) Viewed 327 times


Test1.png is a transparent image of two colors. (Transparent white)
Test2.png is a black alpha channel image of [one color].

Please tell me how to convert it to webp, .bmp, .tiff etc. without losing transparency information of these images.


My aim is to convert 8-bit transparent index images etc. to 32-bit format compatible with alpha channel. (That is, .gif conversion is not included)

But the result of this simple conversion work was a cool two color finish of white and black. (Like a dot image)

test1bad.png (1.8 KiB) Viewed 327 times

test2bad2(24bit).png (2.8 KiB) Viewed 327 times

test3.png (39.65 KiB) Viewed 306 times

Test3.png is an alpha layer with 256 colors of grayscale.
Although the white background is originally a transparent part, it seems that it can not be completely read. Let's expect from the future xnview series.*


After all, in order to preserve the [transparency] information accurately, as an example, I thought of a method to convert the image to a 32-bit alpha channel,
I do not understand how to do it properly.
By the way, please refer to this article for the conversion method.

test1good(32bit).png (1.68 KiB) Viewed 327 times
test2good(32bit).png (17.73 KiB) Viewed 327 times
test3(32bit).png (53.71 KiB) Viewed 306 times

The last 3 images are the images I am aiming for.
Since it already converted to 32 bits, it seems that it will not collapse even if it converts it to another format.


Postscript: This article was scheduled to be posted on [General Support].
I tried to submit it in order,
I decided to post to [Suggestions].
Last edited by abobong on Mon Apr 03, 2017 2:12 pm, edited 2 times in total.

Posts: 6
Joined: Tue Mar 01, 2016 5:56 am

Re: In order to convert images of some alpha channels correc

Postby abobong » Mon Apr 03, 2017 9:08 am

Summary of requests.

* Increase the writing precision of the alpha channel *

When converting the transparency index image (8 bits) to full color (24 bits or more), please improve so that you can output accurate alpha channel with default settings.

I think that this kind of flexibility is necessary for handling images of the next generation.

Return to “MP - Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest