gigbig Posted May 15, 2015 Share Posted May 15, 2015 Hi,I am trying to "hack" the spritesheets limitations by using JPG images with alpha channel.The process is simple:- I have a starting PNG with alpha channel- from this PNG I save a JPG (with varying fill colour for originally transparent areas)- from the PNG I extract the alpha channel and save it as an opaque indexed colour grayscale image- I load the new JPG and the grayscale PNG, and use the PNG as alpha channel for the JPG. These are the two images, the JPG and the grayscale PNG animBitmapData is BitmapData from the JPGanimBitmapData_ALPHA is BitmapData from the grayscale PNG I did everything, but the last step doesn't work, animBitmapData is still opaqueanimBitmapData.copyChannel(animBitmapData_ALPHA, animBitmapData_ALPHA.rect, new Point(0, 0), BitmapDataChannel.ALPHA, BitmapDataChannel.RED);animBitmapData.transparent returns false, could this be the problem?Or maybe it is not correct to use a grayscale image as alpha channel? - Coding in Haxe + OpenFl - gigbig 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.