public final class Image extends BaseParagraph
| Constructor and Description |
|---|
Image()
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
convertToJpeg(InputStream value)
Try to convert to stream with bmp/png/gif/tiff image to stream with JPG format image.
|
Object |
deepClone()
Clone the image.
|
BitmapInfo |
getBitmapInfo()
Gets or sets uncompressed image bytes.
|
Rectangle |
getBitmapSize()
Gets the image bitmap size.
|
BufferedImage |
getBufferedImage()
Gets the java awt image.
|
String |
getFile()
Gets the image file.
|
ImageFileType |
getFileType()
Gets the image file type.
|
double |
getFixHeight()
Gets the image height.
|
double |
getFixWidth()
Gets the image width.
|
double |
getImageScale()
Gets the image scale.
|
InputStream |
getImageStream()
Gets the image stream.
|
static String |
getMimeType(com.aspose.ms.System.Drawing.Image i)
Returns mime type for image.
|
TextFragment |
getTitle()
Gets a string value that indicates the title of the image.
|
boolean |
isApplyResolution()
Gets or sets a boolean value that indicates whether the image use resolution during generation
|
boolean |
isBlackWhite()
Gets a boolean value that indicates whether the image is forced to be black-and-white.
|
boolean |
isBlackWhiteForGrayScale()
Try to detect and use 1bpp encoding for grayscale images
Default value == FALSE
|
void |
setApplyResolution(boolean value)
Gets or sets a boolean value that indicates whether the image use resolution during generation
|
void |
setBitmapInfo(BitmapInfo value)
Gets or sets uncompressed image bytes.
|
void |
setBlackWhite(boolean value)
Sets a boolean value that indicates whether the image is forced to be black-and-white.
|
void |
setBlackWhiteForGrayScale(boolean blackWhiteForGrayScale)
Try to detect and use 1bpp encoding for grayscale images.
|
void |
setBufferedImage(BufferedImage value)
Sets the java awt image.
|
void |
setFile(String value)
Sets the image file.
|
void |
setFileType(ImageFileType value)
Sets the image file type.
|
void |
setFixHeight(double value)
Sets the image height.
|
void |
setFixWidth(double value)
Sets the image width.
|
void |
setImageScale(double value)
Sets the image scale.
|
void |
setImageStream(InputStream value)
Sets the image stream.
|
void |
setTitle(TextFragment value)
Sets a string value that indicates the title of the image.
|
getHorizontalAlignment, getHyperlink, getMargin, getVerticalAlignment, getZIndex, isFirstParagraphInColumn, isInLineParagraph, isInNewPage, isKeptWithNext, setFirstParagraphInColumn, setHorizontalAlignment, setHyperlink, setInLineParagraph, setInNewPage, setKeptWithNext, setMargin, setVerticalAlignment, setZIndexpublic String getFile()
Gets the image file.
public void setFile(String value)
Sets the image file.
value - String valuepublic final BitmapInfo getBitmapInfo()
Gets or sets uncompressed image bytes.
public final void setBitmapInfo(BitmapInfo value)
Gets or sets uncompressed image bytes.
value - BitmapInfo instancepublic final Rectangle getBitmapSize()
Gets the image bitmap size.
public double getFixWidth()
Gets the image width.
public void setFixWidth(double value)
Sets the image width.
value - double valuepublic double getFixHeight()
Gets the image height.
public void setFixHeight(double value)
Sets the image height.
value - double valuepublic ImageFileType getFileType()
Gets the image file type.
ImageFileTypepublic void setFileType(ImageFileType value)
Sets the image file type.
value - int valueImageFileTypepublic double getImageScale()
Gets the image scale.
public void setImageScale(double value)
Sets the image scale.
value - double valuepublic InputStream getImageStream()
Gets the image stream.
public void setImageStream(InputStream value)
Sets the image stream.
value - InputStream valuepublic boolean isApplyResolution()
Gets or sets a boolean value that indicates whether the image use resolution during generation
public void setApplyResolution(boolean value)
Gets or sets a boolean value that indicates whether the image use resolution during generation
value - boolean valuepublic boolean isBlackWhite()
Gets a boolean value that indicates whether the image is forced to be black-and-white. If TIFF image of CCITT subformat is used, this property must be set to true.
public void setBlackWhite(boolean value)
Sets a boolean value that indicates whether the image is forced to be black-and-white. If TIFF image of CCITT subformat is used, this property must be set to true.
value - boolean valuepublic TextFragment getTitle()
Gets a string value that indicates the title of the image.
public void setTitle(TextFragment value)
Sets a string value that indicates the title of the image.
value - TextFragment valuepublic static String getMimeType(com.aspose.ms.System.Drawing.Image i)
Returns mime type for image.
i - Image object.public static InputStream convertToJpeg(InputStream value)
value - InputStream instancepublic Object deepClone()
Clone the image.
deepClone in interface com.aspose.ms.System.ICloneabledeepClone in class BaseParagraphpublic void setBufferedImage(BufferedImage value)
Sets the java awt image.
value - BufferedImage objectpublic BufferedImage getBufferedImage()
Gets the java awt image.
public void setBlackWhiteForGrayScale(boolean blackWhiteForGrayScale)
blackWhiteForGrayScale - boolean valuepublic boolean isBlackWhiteForGrayScale()
Copyright © 2025 Aspose. All Rights Reserved.