Summary: | [PATCH] Add support for cropped images in XSLFPictureShape.drawContent() | ||
---|---|---|---|
Product: | POI | Reporter: | Don Boulia <djboulia> |
Component: | XSLF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.9-FINAL | ||
Target Milestone: | --- | ||
Hardware: | Macintosh | ||
OS: | Mac OS X 10.4 | ||
Attachments: | Patch for cropped images in XSLF |
you need to add at least a testcase for the patch to be accepted. (In reply to Cédric Walter from comment #1) > you need to add at least a testcase for the patch to be accepted. I did include an example .pptx in the patch under the test-data/slideshow directory that shows the problem and demonstrates the difference. Since this is a display issue it requires visual inspection to see the before and after. test-data/slideshow seemed to be the place where other display related test cases were placed in the source tree, perhaps that was an incorrect assumption. In terms of a unit test, ideally we'd have something that writes an image with and without clipping, saves it, loads the new file, and checks that the right data got written in. That would then be used in combination with any manual visual testing I've added a disabled test case for visual - i.e. manual - comparison. Similar to TestFontRendering it doesn't make sense to compare images because of tiny rendering differences in windows/unix. Apart of that, I thought it's better to work with clipping instead of image manipulation before the image is written to the graphics context ... at least the test file and other manual tests, e.g. with negative cropping values, looked good Applied with r1634410 |
Created attachment 29937 [details] Patch for cropped images in XSLF XSLFSlide.draw() doesn't currently support drawing cropped images in slides. This patch implements support for cropping and includes a test pptx that shows various types of cropped images.