public final class XImage extends Object
Class representing image X-Object.
Constructor and Description |
---|
XImage(com.aspose.pdf.engine.data.IPdfDataStream image) |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes image from the parent collection.
|
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 or sets 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,
ImageFormatInternal format)
Saves image into stream with requested format.
|
void |
save(OutputStream stream,
ImageFormatInternal 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,
ImageFormatInternal 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)
Gets or sets image name.
|
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 or sets image name.
public void setName(String value)
Gets or sets image name.
public 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, ImageFormatInternal format)
Saves image into stream with requested format.
stream
- Stream where image will be savedformat
- Format which will be used for image enconding.ImageFormatInternal
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 savedformat
- Format which will be used for image enconding. ImageFormat
resolution
- Image resolutionpublic void saveInternal(com.aspose.ms.System.IO.Stream stream, ImageFormatInternal format, int resolution)
public void save(OutputStream stream, ImageFormatInternal 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 resolutionImageFormatInternal
public static boolean isImage(com.aspose.pdf.engine.data.IPdfPrimitive primitive)
Returns true if the primitive is an image.
primitive
- IPdfPrimitiveCopyright © 2014 Aspose. All Rights Reserved.