Page 1 of 1

In order to convert images of some alpha channels correctly.

Posted: Mon Apr 03, 2017 5:41 am
by abobong
test1.png
test1.png (1.14 KiB) Viewed 1171 times
test2.png
test2.png (13.82 KiB) Viewed 1171 times
1.

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.

------------------------------------------

2.
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
test1bad.png (1.8 KiB) Viewed 1171 times
test2bad2(24bit).png
test2bad2(24bit).png (2.8 KiB) Viewed 1171 times
test3.png
test3.png (39.65 KiB) Viewed 1150 times
3.
*Other
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.*

--

4.
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.
http://newsgroup.xnview.com/viewtopic.p ... bp#p130494
test1good(32bit).png
test1good(32bit).png (1.68 KiB) Viewed 1171 times
test2good(32bit).png
test2good(32bit).png (17.73 KiB) Viewed 1171 times
test3(32bit).png
test3(32bit).png (53.71 KiB) Viewed 1150 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].
Sorry

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

Posted: Mon Apr 03, 2017 9:08 am
by abobong
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.

Re: In order to convert images of some alpha channels correctly.

Posted: Sat Jun 10, 2017 11:30 am
by XnTriq
I support this request.

The following attachment is the result of converting test1.png to 32-bit color depth with XnView Classic:
p143016.bmp
p143016.bmp (123.68 KiB) Viewed 825 times
Transparency is preserved.