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() |
com.aspose.ms.System.Drawing.Image |
getGrayscaled()
Gets grayscaled version of image.
|
int |
getHeight()
Gets height of the image.
|
com.aspose.ms.System.Drawing.Image |
getImage() |
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) |
void |
save(OutputStream stream,
ImageType format) |
void |
save(OutputStream stream,
ImageType format,
int resolution) |
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) |
public com.aspose.ms.System.Drawing.Image 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()
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)
public void save(OutputStream stream)
public void save(OutputStream stream, ImageType format)
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, ImageType format, int resolution)
public void save(OutputStream stream, ImageType format, int resolution)
public static boolean isImage(com.aspose.pdf.engine.data.IPdfPrimitive primitive)
Returns true if the primitive is an image.
Copyright © 2020 Aspose. All Rights Reserved.