thorvg icon indicating copy to clipboard operation
thorvg copied to clipboard

tvg_saver: optimize the bitmap data with premultiplied alpha processing.

Open hermet opened this issue 1 year ago • 0 comments

We observed, one tvg picture has a broken image:

image

This problem arises because the current raw_loader expects a premultiplied-alpha image, while the tvg saver writes it with a straight-alpha image. We can optimize the tvg saver to support encoding bitmap data with premultiplying. Alternatively, the bitmap image loader could allow an option for 'premultiply' for the bitmap data. Eitherway it could fix this problem but the first approach is more preferred.

hermet avatar Jun 24 '24 08:06 hermet