public final class XImage extends Object
Class representing image X-Object.
Modifier and Type | Method and Description |
---|---|
boolean |
containsTransparency()
If the image contains transparancy than return true; otherwise, false.
|
void |
delete()
Deletes image from the parent collection.
|
int |
getColorType()
Returns color type of image.
|
com.aspose.pdf.engine.data.IPdfDataStream |
getEngineImg()
IPdfImage object which decribes image.
|
BufferedImage |
getGrayscaled()
Gets grayscaled version of image.
|
int |
getHeight()
Gets height of the image.
|
com.aspose.ms.System.Drawing.Image |
getImage()
For internal use only
|
String |
getName()
Gets image name.
|
int |
getWidth()
Gets width of the image.
|
static boolean |
isImage(com.aspose.pdf.engine.data.IPdfPrimitive primitive)
Returns true if the primitive is an image.
|
void |
replace(InputStream image)
Replaces image onto stream specified in
image . |
void |
save(OutputStream stream)
Saves image data into stream as JPEG image.
|
void |
save(OutputStream stream,
float xDpi,
float yDpi)
Saves image into stream with requested format.
|
void |
save(OutputStream stream,
ImageType format)
Saves image into stream with requested format.
|
void |
save(OutputStream stream,
ImageType format,
int resolution)
Saves image into stream with requested format.
|
void |
save(OutputStream stream,
int resolution)
Saves image into stream with requested format with specified resolution.
|
void |
saveInternal(com.aspose.ms.System.IO.Stream stream,
ImageType format,
int resolution) |
void |
saveInternal(com.aspose.ms.System.IO.Stream stream,
int resolution)
Saves image data into stream as JPEG image with specified resolution.
|
void |
setName(String value)
Sets image name.
|
public boolean containsTransparency()
If the image contains transparancy than return true; otherwise, false.
public BufferedImage getGrayscaled()
Gets grayscaled version of image.
public void delete()
Deletes image from the parent collection.
public void replace(InputStream image)
Replaces image onto stream specified in image
.
image
- Stream with image data.public com.aspose.pdf.engine.data.IPdfDataStream getEngineImg()
IPdfImage object which decribes image. Internal only
public int getWidth()
Gets width of the image.
public int getHeight()
Gets height of the image.
public String getName()
Gets image name.
public void setName(String value)
Sets image name.
value
- String valuepublic void save(OutputStream stream)
Saves image data into stream as JPEG image.
stream
- Stream where image data will be saved.public void save(OutputStream stream, float xDpi, float yDpi)
Saves image into stream with requested format.
stream
- OutputStream where image will be savedxDpi
- Image horizontal resolutionyDpi
- Image vertical resolutionpublic void save(OutputStream stream, ImageType format)
Saves image into stream with requested format.
stream
- Stream where image will be savedformat
- Format which will be used for image enconding.ImageType
public com.aspose.ms.System.Drawing.Image getImage()
public void saveInternal(com.aspose.ms.System.IO.Stream stream, int resolution)
Saves image data into stream as JPEG image with specified resolution.
stream
- Stream where image data will be saved.resolution
- Image resolutionpublic void save(OutputStream stream, int resolution)
Saves image into stream with requested format with specified resolution.
stream
- Stream where image will be savedresolution
- Image resolutionpublic void saveInternal(com.aspose.ms.System.IO.Stream stream, ImageType format, int resolution)
public void save(OutputStream stream, ImageType format, int resolution)
Saves image into stream with requested format.
stream
- Stream where image will be savedformat
- Format which will be used for image enconding.resolution
- Image resolutionImageType
public static boolean isImage(com.aspose.pdf.engine.data.IPdfPrimitive primitive)
Returns true if the primitive is an image.
primitive
- IPdfPrimitivepublic int getColorType()
Returns color type of image.
Copyright © 2016 Aspose. All Rights Reserved.