Bug 58716

Summary: Picture.resize() is slow as image is read for dimensions again
Product: POI Reporter: Aman Kapur <amankapur91>
Component: XSSFAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: enhancement    
Priority: P2    
Version: 3.13-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   

Description Aman Kapur 2015-12-10 11:18:46 UTC
In Picutre.resize() -> Picture.getPreferredSize() -> ImageUtils.getImageDimension() the image is read once again. Requesting enhancement to pass in Dimensions of the image before hand to avoid a slow read operation only to get dimensions.

More Info on use case: http://stackoverflow.com/questions/34150804/apache-poi-xssfpicture-resize-too-slow-for-multiple-images-in-a-xssfsheet
Comment 1 Dominik Stadler 2015-12-31 08:47:52 UTC
Any chance you could produce a patch for this together with some unit-tests to cover the new functionality?