PngImageEncoder in org.apache.batik.ext.awt.image.codec.png is dumping my attempts to make a SVG file with a RuntimeException (line 886 : public void encode(RenderedImage im))
A quick dig through the code showed it does this when the channels in a PNG did not have an equal number of bits --> this.bitDepth = sampleSize[0]; // Ensure all channels have the same bit depth for (int i = 1; i < sampleSize.length; i++) { if (sampleSize[i] != bitDepth) { throw new RuntimeException(); } } and interrogating my PNG files showed this was true for a couple of them. I have a couple of PNGs with 8-bit red/green/blue channels and a 1-bit alpha channel, equating to what is a transparent bitmasked image (rather than translucent) So my question is has my paint program (Paint.NET on Windows 7) generated a bad PNG, or is this a bug in batik? -- View this message in context: http://batik.2283329.n4.nabble.com/Bug-or-malformed-PNG-tp3552626p3552626.html Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org