[ 
https://issues.apache.org/jira/browse/BATIK-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009669#comment-18009669
 ] 

Stanimir Stamenkov commented on BATIK-1383:
-------------------------------------------

Does it look more like a {{java.awt.image.ColorConvertOp}} issue?

{noformat:title=java.lang.IllegalArgumentException: Component index out of 
range: 3}
        at 
java.desktop/java.awt.color.ColorSpace.rangeCheck(ColorSpace.java:528)
        at 
java.desktop/java.awt.color.ICC_ColorSpace.getMinValue(ICC_ColorSpace.java:583)
        at 
java.desktop/java.awt.image.ColorConvertOp.nonICCBIFilter(ColorConvertOp.java:815)
        at 
java.desktop/java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:275)
        at 
org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:280)
        at 
org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(FormatRed.java:116)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:523)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:512)
        at 
org.apache.batik.ext.awt.image.codec.imageio.AbstractImageIORegistryEntry$1.run(AbstractImageIORegistryEntry.java:136)
{noformat}

Using current JDK 25 EA, I'm getting a slightly different trace:

{noformat:title=java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds 
for length 3}
        at 
java.desktop/java.awt.image.ComponentColorModel.getNormalizedComponents(ComponentColorModel.java:2343)
        at 
java.desktop/java.awt.image.ColorConvertOp.nonICCBIFilter(ColorConvertOp.java:811)
        at 
java.desktop/java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:275)
        at 
org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:280)
        at 
org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(FormatRed.java:116)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:523)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:512)
        at 
org.apache.batik.ext.awt.image.codec.imageio.AbstractImageIORegistryEntry$1.run(AbstractImageIORegistryEntry.java:136)
{noformat}


> Error transcoding specific svgs
> -------------------------------
>
>                 Key: BATIK-1383
>                 URL: https://issues.apache.org/jira/browse/BATIK-1383
>             Project: Batik
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.17
>         Environment: Windows 11
>            Reporter: Melanie Traynor
>            Priority: Major
>         Attachments: 2025-07-21_14-25-35.png, a117786.svg, a117926.svg
>
>
> We are using batik to transcode 2 svgs using the PNGTranscoder but it 
> ultimately fails with an error thrown from java.awt.ColorSpace  
> 'java.lang.IllegalArgumentException: Component index out of range: 3'
>  
> I have attached the svgs and the stack trace of the source code at the time 
> of exception.  Please let us know if this is a bug or an issue with the data. 
>  The svgs display successfully in other tools.
> I tried with Batik 1.19 too but get the same issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-h...@xmlgraphics.apache.org

Reply via email to