[Poppler-bugs] [Bug 22473] Need to handle the Matte entry
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 24 14:06:56 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=22473
--- Comment #8 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
BTW, I made the same mistake as You when I first read the formula in the PDF
spec:
c′ = m + α * (c - m)
where
c′ is the value to be provided in the image source data
c is the original image component value
m is the matte colour component value
α is the corresponding mask sample
I also thought first that we have to calulate c′, but that is what is provided
by the image source data!!! We have to calculate c!!
<==>
c = m + (c′ - m) / α
And then we have to keep in mind that α is the opacity with value between 0..1,
and since the mask has value between 0..255 we have to divide the mask sample
by 255 or multiply with the inverse.
This does the trick.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160224/5293b6f9/attachment.html>
More information about the Poppler-bugs
mailing list