Are you using a template workbook or create one from scratch using POI?
HSSFPicture.resize() uses some hardcoded constants that were obtained empirically for the default font (Arial 10pt) at 96 dpi. If any of these settings are custom, the result can be "off".

If you think it is a bug, create an issue in bugzilla and attach the image and sample code to reproduce the problem (and the bad file too).

Yegor

Hi,

Bump. Anyone have any idea for this?

Thanks,

Francois


-----Original Message-----
Sent: March 6, 2009 10:05 AM
To: [email protected]
Subject: Image resized when inserted in Excel through createPicture

Hi,

I'm trying to insert an image through HSSFPatriarch's createPicture method, but 
when opening the generated file in Excel the image is resized. I've set the 
resolution of the image to 96 dpi to match what Excel uses, and although the 
height seems OK the width is set to somewhere between 80 and 90%.

I've tried using HSSFPicture's resize method with a scale parameter, but for 
some reason I keep getting an error.

Anyone seen this before?

Thanks,

Francois

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to