Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, February 17, 2011 1:05:13 AM(UTC)

asdave  
asdave

Groups: Registered
Posts: 4


Hi,

I'm using LEADTOOLS v14 and have a 32bit image with transparency values in the alpha channel. When trying to save this to a FILE_BMP the file produced is 32bit but the alpha channel is opaque (all 255 values). The LEADTOOLS v14 documentation seems a bit confussing on what is actually supported:

It first says:
"You can read and write the following bits per pixel, without RLE compression: 1, 4, 8, 16, 24, 32.
You can read and write the following bits per pixel, with RLE compression: 4, 8."

But then says:
"You can read and write the following bits per pixel, without RLE compression: 1, 4, 8, 24.
You can read (but not write) the following bits per pixel, with RLE compression: 4, 8."

So, can you only save to 24bit maximum for FILE_BMP formats in v14?

Thanks,
Dave.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, February 17, 2011 7:38:36 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Dave,
We do support saving 32-bit BMP with alpha channel, but some viewers don't support or look for alpha channels in BMP files. I'm attaching two files which were saved using LEADTOOLS v14 and both 32-bit images contain alpha channels but applications such as Windows Picture and Fax Viewer does not load the BMP's Alpha channel.
File Attachment(s):
WithAlpha.zip (522kb) downloaded 24 time(s).
 
#3 Posted : Sunday, February 20, 2011 11:05:01 PM(UTC)

asdave  
asdave

Groups: Registered
Posts: 4


Yes, your correct.. My saved BMPs don't show the alpha channel in Windows viewer or supprisingly Paint.NET, but it is visible in Gimp. So, it seems that LeadTools is working as expected for BMPs.

For PNGs there doesn't seems to be a saved alpha channel though from LeadTool v14 which it does indicate in the documentation (and also something about single colour transparency). So, can I ask how you were able to create the PNG in your attachment from v14?

 
#4 Posted : Monday, February 21, 2011 4:01:54 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

It all depends on the source of the file.
If you have a file that already has an Alpha channel and you load it then save it as 32-bit using LEADTOOLS, the alpha channel will be saved in the output.

If you have a file that does NOT have an alpha channel but has a different type of transparency, such as a transparent color, and you load it with LEADTOOLS then save it as 32-bit, the transparent color will NOT be automatically converted to an alpha channel.
If you need to do this (convert transparent color to alpha) you can do it programmatically using LEADTOOLS in a few steps.

If you're not sure what the problem is, send me a sample image in a ZIP or RAR file and I will check it at my side. Also, please explain the exact expected behavior.

You can either post it here or send it to support@leadtools.com and mention this post.
When attaching to the forums, do not use the "Preview" feature.
 
#5 Posted : Monday, February 21, 2011 4:46:41 AM(UTC)

asdave  
asdave

Groups: Registered
Posts: 4


I've retested saving PNGs and it does seem that they are saving the 32bit channel correctly. We are creating the images from scratch and programmatically setting the alpha values but I think we were saving as 24bit some of the time. We probably did encounter the single transparent colour behaviour as well in the past and expected the alpha channel to be set automatically. I can't find an example of this now though.

I think you've answered my questions for now, thanks.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.149 seconds.