Picture datatypes and the alpha channel [solved]

4 posts / 0 new
Last post
Hans
Hans's picture
Offline
Last seen: 3 months 3 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: 3 months 6 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 3 weeks ago
Joined: 2010-12-09 22:04
Re: Picture datatypes and the alpha channel [solved]

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

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

Hans
Hans's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: Picture datatypes and the alpha channel [solved]

@thomas

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

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

Log in or register to post comments