|Summary:||EMF image support in slideshows|
|Product:||POI||Reporter:||Ghazi Triki <ghazi.nocturne>|
|Component:||XSLF||Assignee:||POI Developers List <dev>|
Description Ghazi Triki 2017-01-26 20:38:45 UTC
Actually if a file contains an EMF or a WMF image, the image is not exported when trying to export it as PNG.
Comment 1 Tim Allison 2017-01-26 20:47:08 UTC
We just added a stub parser for EMF that focuses on text extraction and embedded document extraction (yes, a PDF or a WMF can be embedded in an EMF, yeeha!). Always looking for patches for rendering... If you're having problems with rendering WMF, please open a separate issue. There is support for rendering WMF. Thank you.
Comment 2 Ghazi Triki 2017-01-26 21:23:36 UTC
I can provide an example of the file I mentioned. Is it a good idea?
Comment 3 Javen O'Neal 2017-03-23 06:31:55 UTC
Sure, as long as the file is licensed under ASL 2.0 and under 1 MB (bugzilla's file attachment limit, I think), otherwise email it to the dev list or upload it to your github. It might be a while before someone has time and is interested in rendering an EMF or WMF file, but would be a fun exercise.
Comment 4 Andreas Beeker 2018-12-16 18:22:57 UTC
Merged the hemf branch via r1849040 There are still rendering issues and EMF+ is only very rudimentary implemented, but most cases of the common crawl corpus pass, so I hope it doesn't affect the next release too much. I keep the issue open while still adding functionality.
Comment 5 Andreas Beeker 2019-05-04 23:04:11 UTC
Add more records for EMF+ via r1858625 Furthermore there are now extractors method (getEmbeddings()) in HwmfPicture and HemfPicture available.
Comment 8 Andreas Beeker 2019-06-23 22:22:54 UTC
Thanks to Michael Ford, who provided me a test deck with various *SL*/EMF/WMF rendering errors. Applied via r1861952 This patch contains the following fixes: * changed the EMF/WMF/ImageRenderer API to use Dimension2D instead of Dimension, to cover cases where vector graphic patterns where below 1 pixel unit * reordered image data loading in DrawPaint because EMF lazy loaded the image data and couldn't access it, when the stream was closed * reset graphic context clipping after EMF pictures were processed * inverted the logic for HSLF getForegroundColor()/getBackgroundColor() because of a bit mask handling error * partly implemented WmfDibStretchBlt * initialize the WMF viewport with the inner bounds, because some pictures in ANISOTROPIC mapping mode wouldn't be rendered correctly otherwise, i.e. either upside down or with an offset * empty clippings on WmfTextOut are now ignored * refactored the clipping handling in HwmfGraphics * handled offsets/differences of innerBounds (bounds set via WMF records) to the placeable header * Removed invalid ObjectTable marker of WmfOffsetClipRgn, WmfIntersectClipRect, WmfExcludeClipRect - they are processed immediately * PPTX2PNG output files are now 1-based, so the file index matches the -slide parameter * PPTX2PNG output file names can now be configured via -outfile and -outpat switch * XSLF shapes with a background picture defined as pic element instead of the blip properties are also handled now