Class RtfExternalGraphic.FormatBase
java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic.FormatBase
- Direct Known Subclasses:
RtfExternalGraphic.FormatBMP,RtfExternalGraphic.FormatEMF,RtfExternalGraphic.FormatGIF,RtfExternalGraphic.FormatJPG,RtfExternalGraphic.FormatPNG
- Enclosing class:
RtfExternalGraphic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(RtfExternalGraphic.FormatBase format, byte[] data) Convert image data if necessary - for example when format is not supported by rtf.determineFormat(byte[] data) Determine image file format.Get rtf tag.intgetType()Get image type.static booleanisFormat(byte[] data) Determines whether the image is in the according format.
-
Constructor Details
-
FormatBase
private FormatBase()
-
-
Method Details
-
isFormat
public static boolean isFormat(byte[] data) Determines whether the image is in the according format.- Parameters:
data- Image- Returns:
- true If according type\n false Other type
-
convert
Convert image data if necessary - for example when format is not supported by rtf.- Parameters:
format- Format typedata- Image
-
determineFormat
Determine image file format.- Parameters:
data- Image- Returns:
- Image format class
-
getType
public int getType()Get image type.- Returns:
- Image format class
-
getRtfTag
Get rtf tag.- Returns:
- Rtf tag for image format.
-