Repository navigation
Semi transparent images when rendered on canvas looks darker than original image. #5143
Replies: 1 comment 1 reply
|
Double premultiplication is one possible cause, but the symptom alone isn't enough to identify a Skia bug. The key is how the image reaches For an 8-bit red pixel at roughly 50% opacity, the representations are:
If a buffer containing the second representation is declared A useful minimal comparison is to decode the original file directly with SkiaSharp and draw it once onto an explicitly opaque white canvas, with no paint opacity/filter or intermediate bitmap. Compare that to your current loading/conversion path on the same white background. If only the latter is dark, investigate its raw-pixel alpha declaration/conversion first. If direct decoding also differs, include the original image, SkiaSharp version/platform and the drawing code; color-space handling and the comparison application's background can also affect the result. |
Uh oh!
There was an error while loading. Please reload this page.
Semi transparent images looks darker when drawn on SKCanvasView than the original image.
It looks like the pixels are premultiplied twice.
Is it an issue or not with skia?
All reactions