Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

Problem rotating 32-bit png with alpha channel

$
0
0

I can do this using OpenCV to load the image file and then the WarpAffine function from the ipp_blur_rotate_sample SDK sample; the alpha channel from the original image is preserved however areas in the new rotated image that were not originally present default to 100% opacity which is not what I want. I would like them to default to transparency but cant see how to do this easily without extra processing ( subsequently I am using ippiAlphaComp_8u_AC4R to composite the rotated image with larger video frames and don't want to them obscure parts of the video ).

I can work round this by my making my images larger and then when compositing specifying a smaller ROI which gets all the important content but doesn't include the opaque new regions but this is not ideal since it requires extra calculation.

- I found out this morning its simply a question of setting the border value argument iWarpAffineLinearInit(...) to a value which has the alpha channel set to zero


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>