Bug 58207 - [PATCH] Provide user access to the original image dimensions
Summary: [PATCH] Provide user access to the original image dimensions
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.13-dev
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 58216
  Show dependency tree
 
Reported: 2015-08-04 15:33 UTC by mark.o
Modified: 2015-09-20 02:32 UTC (History)
0 users



Attachments
patch with proposed changes (4.74 KB, patch)
2015-08-04 15:33 UTC, mark.o
Details | Diff
patch with proposed changes (4.74 KB, patch)
2015-08-04 15:52 UTC, mark.o
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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