[
https://issues.apache.org/jira/browse/BATIK-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Tošovský updated BATIK-1170:
--------------------------------
Attachment: ring_mask_before.png
ring_mask_after.png
BATIK-1170.patch
ring_mask.svg
Implementing improved condition. In the constructor of affected class it is
determined if JDK is capable to preserve alpha when ColorConvertOp is applied.
This is checked once per rasterization process. This info is then stored in
final variable, which is later used for decision whether to use that workaround
or not. It was tested successfully in Oracle JDK7/8 ando also in OpenJDK 7/8,
both on Windows 10.
> Workaround for incorrect ColorConvertOp alpha handling breaks masking
> ---------------------------------------------------------------------
>
> Key: BATIK-1170
> URL: https://issues.apache.org/jira/browse/BATIK-1170
> Project: Batik
> Issue Type: Bug
> Affects Versions: 1.8
> Reporter: Jan Tošovský
> Attachments: BATIK-1170.patch, ring_mask.svg, ring_mask_after.png,
> ring_mask_before.png
>
>
> There is workaround in Any2LumRed.java with this comment:
> // All this nonsense is to work around the fact that the
> // Color convert op doesn't properly copy the Alpha from
> // src to dst.
> When processing SVG with mask in Oracle JDK 8, this workaround is the root
> cause of several issues reported here in JIRA.
> The only related issue I've found so far is
> https://bugs.openjdk.java.net/browse/JDK-8005930. Can anybody confirm the
> comment/workaround above was targeted for OpenJDK?
> When this code is commented, the result is processed correctly (Oracle JDK).
> However, I am afraid this is not a proper way how to fix it as this code
> should produce same results for various JDKs/versions. For this we need a new
> boolean variable, something like isColorConvertOpAlphaSupported - the result
> of analyzing destination's alpha (if present or not) after running the simple
> ColorConvertOp test. That workaround would be applied only if alpha is not
> supported.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]