Bug 58207

Summary: [PATCH] Provide user access to the original image dimensions
Product: POI Reporter: mark.o <Mark.Olesen>
Component: XSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: PatchAvailable
Priority: P2    
Version: 3.13-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 58216    
Attachments: patch with proposed changes
patch with proposed changes

Description mark.o 2015-08-04 15:33:33 UTC
Created attachment 32957 [details]
patch with proposed changes

- useful information when resizing anchors.

- simply moved some code from XSLFPictureShape to XSLFPictureData
  and cache the values there.
Comment 1 mark.o 2015-08-04 15:43:48 UTC
I don't know if it's a bug or inconsistency.
XSLFPictureShape.resize() and HSLFPictureShape.setDefaultSize() should be roughly equivalent in their basic functionality.
In XSLF, the image dimensions are used directly for setting the anchor size.
In HSLF, they are converted by pixelToPoints() before setting the anchor size.

I don't which is actually correct, or if the underlying anchor implementation is different, but figured it might be worth mentioning.
Comment 2 mark.o 2015-08-04 15:52:35 UTC
Created attachment 32958 [details]
patch with proposed changes

changed method name to getImageDimensions() for some naming consistency with org.apache.poi.ss.usermodel.Picture interface
Comment 3 Andreas Beeker 2015-09-20 02:32:42 UTC
Thank you for the patch - applied with r1704097

+ same for hslf / common sl
+ unify method names in H/XSLF Slideshow for common sl
+ add/fix header information for PICT/EMF/WMF