sammycage / lunasvg

lunasvg is a standalone SVG rendering library in C++
MIT License
818 stars 115 forks source link

Alpha channel usage info #136

Open ifiddynine opened 12 months ago

ifiddynine commented 12 months ago

We have a use case where we'd like to find out whether the rasterized SVG would contain all opaque pixels, masked alpha (aka either 0 or 1) or standard transparency (a range between 0 or 1).

The only way I can see achieving it in lunasvg today is by rendering the full image and checking every pixel, but that would be pretty wasteful. Would it be practical exposing a function which could determine this information from the lunasvg::Document class?