Cropping PNG transparent files make the image have a black background
When opening a PNG file with a transparent background, it appears with a black background. When I crop it the processed image has a black background instead of a transparent one.
This happens because the CJPEGImage doesn't really support alpha. The black background is just alpha blended with the image's alpha channel and displayed as an RGB image in the viewport. Any cropping, filtering, etc operations you perform on the image therefore will be on this RGB image and so will be saved with the black background.
This is related to #43 and #287 and is listed as a next feature in this roadmap: #142.
Probably if the CJPEGImage class is updated to support alpha natively, saving and loading should work as well, and support for checkerboard patterns should be easy following that.
@sylikc I could look into this and make a PR if you'd like? It's a feature I've been wanting as well.
yes please new update @Raghav-B @sylikc