poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From freemarket <hk-supp...@iscs-i.com>
Subject Poor Image quality when using JFreeChart generated Images in HSLF
Date Sun, 19 Jun 2011 19:56:24 GMT
When using an image generated in JFreeChart which appears crisp in web
browser, same image appears blurry when
embedded as Picture within HSLF slideshow. Here are some details:

image generated by standard chart factory and saved as:

new BufferedImage(width, height, BufferedImage.TYPE_INT_RBG)

image is then read in by:

ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] bytesOut = null;
int picNdx = -1;
try {
    ImageIO.write(img, imgType, baos);
    bytesOut = baos.toByteArray();
    picNdx = ppt.addPicture(bytesOut, Picture.PNG);
} catch (IOException e) {

Where imgType = "png"

the dimensions for the anchor are the same as the images dimensions
specified by the JFreeChart method.
The image always looks blurry. I suspect the default size of the Picture to
have something to do with this
in regards to the POINT_DPI/PIXEL_DPI yet I never invoke the
Picture.setDefaultSize() method.

Any suggestions as to how to enhance the crispness of the embedded image?


View this message in context: http://apache-poi.1045710.n5.nabble.com/Poor-Image-quality-when-using-JFreeChart-generated-Images-in-HSLF-tp4504325p4504325.html
Sent from the POI - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message