In order to convert images of some alpha channels correctly.

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

Post Reply
abobong
Posts: 10
Joined: Tue Mar 01, 2016 5:56 am

In order to convert images of some alpha channels correctly.

Post by abobong »

test1.png
test1.png (1.14 KiB) Viewed 971 times
test2.png
test2.png (13.82 KiB) Viewed 971 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 971 times
test2bad2(24bit).png
test2bad2(24bit).png (2.8 KiB) Viewed 971 times
test3.png
test3.png (39.65 KiB) Viewed 950 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 971 times
test2good(32bit).png
test2good(32bit).png (17.73 KiB) Viewed 971 times
test3(32bit).png
test3(32bit).png (53.71 KiB) Viewed 950 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
Last edited by abobong on Mon Apr 03, 2017 2:12 pm, edited 2 times in total.
abobong
Posts: 10
Joined: Tue Mar 01, 2016 5:56 am

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

Post 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.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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 625 times
Transparency is preserved.
Post Reply