Package org.apache.poi.hwpf.converter
Interface PicturesManager
-
@Beta public interface PicturesManager
User-implemented pictures manager to store images on-disk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
savePicture(byte[] content, PictureType pictureType, java.lang.String suggestedName, float widthInches, float heightInches)
Stores image (probably on disk).
-
-
-
Method Detail
-
savePicture
java.lang.String savePicture(byte[] content, PictureType pictureType, java.lang.String suggestedName, float widthInches, float heightInches)
Stores image (probably on disk). Please, note that different output format support different file types, so image conversion may be required. For example, HTML browsers usually supportsPictureType.GIF
,PictureType.JPEG
,PictureType.PNG
,PictureType.TIFF
, but rarelyPictureType.EMF
orPictureType.WMF
. FO (Apache FOP) supports at least PNG and SVG types.- Parameters:
content
- picture contentpictureType
- detected picture type (may bePictureType.UNKNOWN
suggestedName
- suggested picture name (based on picture offset in file), supposed to be uniquewidthInches
- display width in inches (scaled). May be useful for rendering vector images (such as EMF or WMF)heightInches
- display height in inches (scaled). May be useful for rendering vector images (such as EMF or WMF)- Returns:
- path to file that can be used as reference in HTML (img's src) of XLS FO (fo:external-graphic's src) or null if image were not saved and should not be referenced from result HTML / FO.
-
-