Bug 54541 - [PATCH] Add support for cropped images in Slide.draw()
Summary: [PATCH] Add support for cropped images in Slide.draw()
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.9-FINAL
Hardware: Macintosh Mac OS X 10.4
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-10 15:25 UTC by Don Boulia
Modified: 2014-12-29 13:41 UTC (History)
0 users



Attachments
BLIP cropping patch file (70.10 KB, application/x-gzip)
2013-02-10 15:25 UTC, Don Boulia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Don Boulia 2013-02-10 15:25:19 UTC
Created attachment 29936 [details]
BLIP cropping patch file

The BLIP properties for cropping images aren't used in the current draw() method for Slide.  This patch implements cropping and includes a .ppt test file that demonstrates the issues for cropped images.

This support is also missing from ooxml... I have that patch and will submit separately.
Comment 1 Cédric Walter 2014-05-07 14:51:23 UTC
Hi

Thanks for the patch, could you try to also submit as patch also some unit tests in org.apache.poi.hslf.model.TestPicture

Thanks
Comment 2 Andreas Beeker 2014-12-29 13:41:29 UTC
Thank you for the patch - applied with r1648335
Similar to #54542, I've used clipping instead of sub-imaging.
the extended test image reveals the lack of rotation support in group shapes.
I've already tried to use the same drawing logic as in XSLF (instead of ShapePainter & Co.), but somehow rotated groups have swapped anchors fields for certain rotation angles ... so only applying the patch for the existing drawing logic.