[
https://issues.apache.org/jira/browse/BATIK-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17114607#comment-17114607
]
Jan Hill edited comment on BATIK-1281 at 5/24/20, 11:48 AM:
------------------------------------------------------------
Ok we found the issue outside batik.
The bug/missing feature is in the unbutu 16.04 openjdk8 package. After the
replase by Amazon Corretto 8 everything works as expected.
I beleive the libjpeg which comes with openjdk8 in ubuntu 16.04 did not support
the color scheme in "our" svg.
More detailed:
Ubuntu 16.04 OpenJDK 8 comes with libjpeg-turbo8 version 1.4.2
I beleieve "my" Probleme was/is fixed with libjpeg-turbo version 2.0.0
h3. _"Significant changes relative to 2.0 beta1:_
# _The TurboJPEG API can now decompress CMYK JPEG images that have subsampled
M and Y components (not to be confused with YCCK JPEG images, in which the
C/M/Y components have been transformed into luma and chroma.) Previously, an
error was generated ("Could not determine subsampling type for JPEG image")
when such an image was passed to {{tjDecompressHeader3()}}, {{tjTransform()}},
{{tjDecompressToYUVPlanes()}}, {{tjDecompressToYUV2()}}, or the equivalent Java
methods."_
So there is no bug here - sorry for the noise.
was (Author: janpopan):
Ok we found the issue outside batik.
The bug/missing feature is in the unbutu 16.04 openjdk8 package. After the
replase by Amazon Corretto 8 everything works as expected.
I beleive the libjpeg which comes with openjdk8 in ubuntu 16.04 did not support
the color scheme in "our" svg.
So there is no bug here - sorry for the noise.
> URI BASE64 with whitespace
> --------------------------
>
> Key: BATIK-1281
> URL: https://issues.apache.org/jira/browse/BATIK-1281
> Project: Batik
> Issue Type: Bug
> Affects Versions: 1.12
> Reporter: Jan Hill
> Priority: Critical
> Labels: easyfix
>
> I am sure there is am bug, if the base64 string/stream has whitespaces (
> SPACE; LF; CRLF; CR).
> If you handle base64 strings you have to ignore whitespaces.
> See below. Is there a chance to get them fixed? Or for wich class should this
> fix developed?
> One solution could be:
> org.apache.batik.transcoder.image.ImageTranscoder
> ...
> import org.apache.batik.transcoder.keys.PaintKey;
> +import org.apache.commons.lang3.StringUtils;
> import org.w3c.dom.Document;
> ...
> protected void transcode(Document document,
> String uri,
> TranscoderOutput output)
> throws TranscoderException {
> + StringUtils.deleteWhitespace(uri);
> // Sets up root, curTxf & curAoi
> super.transcode(document, uri, output);
> // prepare the image to be painted
> ...
> But you have to add
> import org.apache.commons.lang3.StringUtils
> and to put this jar to lib and put also a licensefile up there.
> So i didn't know your package architecture policy
> A solution for this bug would be great.
> regards
> Jan
>
> The Exception in BATIK-966 will also be fixed, but BATIK-966 won't work
> because they try to load a gif.
> A part of BATIK-870 will be fixed, but there is some additional problem.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]