本文整理汇总了Java中com.lowagie.text.Image.ORIGINAL_PNG属性的典型用法代码示例。如果您正苦于以下问题:Java Image.ORIGINAL_PNG属性的具体用法?Java Image.ORIGINAL_PNG怎么用?Java Image.ORIGINAL_PNG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.lowagie.text.Image
的用法示例。
在下文中一共展示了Image.ORIGINAL_PNG属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RtfImage
/**
* Constructs a RtfImage for an Image.
*
* @param doc The RtfDocument this RtfImage belongs to
* @param image The Image that this RtfImage wraps
* @throws DocumentException If an error occurred accessing the image content
*/
public RtfImage(RtfDocument doc, Image image) throws DocumentException
{
super(doc);
imageType = image.getOriginalType();
if (!(imageType == Image.ORIGINAL_JPEG || imageType == Image.ORIGINAL_BMP
|| imageType == Image.ORIGINAL_PNG || imageType == Image.ORIGINAL_WMF || imageType == Image.ORIGINAL_GIF)) {
throw new DocumentException("Only BMP, PNG, WMF, GIF and JPEG images are supported by the RTF Writer");
}
alignment = image.getAlignment();
width = image.getWidth();
height = image.getHeight();
plainWidth = image.getPlainWidth();
plainHeight = image.getPlainHeight();
this.imageData = getImageData(image);
}