Uhm wait a minute, I just see what you said about the power of two scaling. Well you still could do the following:
load as texture, then read the alphas as I just described. THEN shift the alpha channel to the blue channel, or to all 3 RGB channels, however. THEN create an image of the same size as the texture, then copyrect the texture to the image, then resize the image to the original size. Now you can access the alpha in the blue channel.
Sounds complicated, but I guess it's a lot easier than unpacking a PNG, that is compressed with the huffman algorithm I think.
The only problems I see are:
- resizing an image is pretty slow.
- no pixelperfect alpha channel due to resize.
load as texture, then read the alphas as I just described. THEN shift the alpha channel to the blue channel, or to all 3 RGB channels, however. THEN create an image of the same size as the texture, then copyrect the texture to the image, then resize the image to the original size. Now you can access the alpha in the blue channel.
Sounds complicated, but I guess it's a lot easier than unpacking a PNG, that is compressed with the huffman algorithm I think.
The only problems I see are:
- resizing an image is pretty slow.
- no pixelperfect alpha channel due to resize.