sammycage / lunasvg

lunasvg is a standalone SVG rendering library in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alpha channel usage info

ifiddynine opened this issue · comments

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?