Picture datatypes and the alpha channel [solved]

4 posts / 0 new
Last post
Hans
Hans's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 2010-12-09 22:04
Picture datatypes and the alpha channel [solved]

I have some PNGs that I'm loading using datatypes, and the alpha channel is not being preserved. Is there any way to get datatypes to preserve the alpha channel? The PNGs definitely have an alpha channel (checked on a PC).

Hans

thomas
thomas's picture
Offline
Last seen: 1 week 4 days ago
Joined: 2011-05-16 14:23
Did you use

Did you use PDTM_READPIXELARRAY with PBPAFMT_ARGB ?

I think the OS 4 datatypes should preserve alpha data. There is no datatype for OS 3 which does it, though. That's the reason for this: http://aminet.net/package/util/libs/pngalpha_lib

Hans
Hans's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 2010-12-09 22:04
Did you use

Did you use PDTM_READPIXELARRAY with PBPAFMT_ARGB ?

No, I'm getting the bitmap using PDTA_DestBitMap. I also have PDTA_Remap set to FALSE when opening the image, but the results are identical on my machine either way.

I think the OS 4 datatypes should preserve alpha data. There is no datatype for OS 3 which does it, though. That's the reason for this: http://aminet.net/package/util/libs/pngalpha_lib

I thought that OS4 datatypes preserved the alpha data too. However, it's not happening.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Hans
Hans's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 2010-12-09 22:04
@thomas I rewrote my code to

@thomas

I rewrote my code to use PDTM_READPIXELARRAY instead, and I now get the alpha channel. Thanks for the hint.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Log in or register to post comments