pichlerd1 / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Error generating image with Java2DRenderer #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-292

It was reported by lfpipe on 02.10.2009 20:57:01 +0200 and last updated in the 
previous bug tracker on 13.01.2010 22:41:58 +0100

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.
The original issue had attachments to it; see comments below.

Original description: 
I have this tag on my html: <img src="img/bord_der.jpg" width="0" height="1">
And I'm getting this exception trying to generate an image: 
java.lang.IllegalArgumentException: Width (0) and height (1) must be non-zero
    at java.awt.image.ReplicateScaleFilter.<init>
(ReplicateScaleFilter.java:85)
    at java.awt.Image.getScaledInstance(Image.java:156)

Here is my code:
Java2DRenderer renderer = new Java2DRenderer(html, HTML_WIDHT, HTML_HEIGHT);
renderer.setBufferedImageType(BufferedImage.TYPE_INT_RGB);
BufferedImage imgBuffer = renderer.getImage();

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 9:47

GoogleCodeExporter commented 8 years ago
Attachment by peterbrant on 13.01.2010 22:31:51 +0100:  snapshot2.png, size 
18389 bytes
Download: http://java.net/jira/secure/attachment/27404/snapshot2.png

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:47

GoogleCodeExporter commented 8 years ago
peterbrant wrote on 13.01.2010 22:31:51 +0100:
Created an attachment (id=109)
Screen shot against current HEAD

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:47

GoogleCodeExporter commented 8 years ago
peterbrant wrote on 13.01.2010 22:41:58 +0100:
Urk... screen shot posted to wrong bug

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:47