DaveLaw created FOP-3301:
----------------------------

             Summary: FOP seems to think PNG Image is an SVG
                 Key: FOP-3301
                 URL: https://issues.apache.org/jira/browse/FOP-3301
             Project: FOP
          Issue Type: Bug
          Components: image/png
    Affects Versions: 2.11
         Environment: Windows 10, Eclipse 2026-03, JDK 17
            Reporter: DaveLaw
             Fix For: main


I'm reading a PNG Image in our custom ResourceResolver.

It works & finds its way into the resulting PDF.

But...
{{org.apache.fop.image.loader.batik.PreloaderSVG}} reports an error:
{{_"Error while trying to load stream as an SVG file: Invalid byte 1 of 1-byte 
UTF-8 sequence."_}}

In...
{code:java}
ResourceResolver.getResource(final URI uri) throws IOException{code}
...I've tried the following...
{code:java}
return new Resource(MimeConstants.MIME_PNG, uri.toURL().openStream());{code}
...but can't seem to find what Type the Resource should have.
(also tried null, "PNG" & "png")

How can I tell FOP it's a PNG and not an SVG?



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

Reply via email to