Yegor Kozlov wrote: > > Try 3.2-FINAL. > > A similar issue was reported in bug #45829. Calling HSSFPicture.resize() > on images that don't specify DPI resulted in a > AritmeticException. I fixed it to use default DPI=96 in such cases. > > > The fixed version is in 3.2-FINAL: > http://svn.apache.org/repos/asf/poi/tags/REL_3_2_FINAL/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java >
Thanks. I'll do that. By the way, I made a variant of resize(), called fitToRect(), which takes the image dimensions and scales the anchor rectangle so that the image will fit without becoming distorted. Worth submitting? My only question is how to specify the original anchor rectangle. In my app I use row, col, rows and char_widths to specify the original rectangle, but don't know that that's the 'natural' choice. But in any case, it makes more sense to fit an image to a rectangle on the spreadsheet than to just resize the anchor to the image's natural size. -- View this message in context: http://www.nabble.com/HSSFPicture%3AgetImageDimension-fails-under-eclipse-works-under-AIX-tp20448425p20462685.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
