| Modifier and Type | Class and Description |
|---|---|
static class |
Image.GetThumbnailImageAbort |
| Constructor and Description |
|---|
Image()
Initializes a new instance of the
Image class. |
| Modifier and Type | Method and Description |
|---|---|
Object |
deepClone()
Creates an exact copy of this
Image. |
void |
dispose()
Releases all resources used by this Image.
|
static Image |
fromFile(String filename)
Creates an
Image from the specified file. |
static Bitmap |
fromHbitmap(byte[] hbitmap)
Creates a
Bitmap from a handle to a GDI bitmap. |
static Image |
fromStream(InputStream stream)
Creates an
Image from the specified data stream. |
static Image |
fromStream(InputStream stream,
boolean useEmbeddedColorManagement)
Creates an
Image from the specified data stream, optionally using embedded
color management information in that stream. |
RectangleF |
getBounds(int[] pageUnit)
Gets the bounds of the image in the specified unit.
|
int |
getFlags()
Gets the integer representing a bitwise combination of
ImageFlags for this Image. |
int |
getFrameCount(FrameDimension dimension)
Returns the number of frames of the specified dimension.
|
UUID[] |
getFrameDimensionsList()
Gets an array of GUIDs that represent the dimensions of frames within this
Image. |
abstract int |
getHeight()
Gets the height, in pixels, of this
Image. |
float |
getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this
Image. |
abstract ColorPalette |
getPalette()
Gets or sets the color palette used for this
Image. |
SizeF |
getPhysicalDimension()
Gets the width and height of this image.
|
abstract int |
getPixelFormat()
Gets the pixel format for this
Image. |
static int |
getPixelFormatSize(int pixfmt)
Returns the color depth, in number of bits per pixel, of the specified pixel format.
|
abstract int[] |
getPropertyIdList()
Gets IDs of the property items stored in this
Image. |
abstract PropertyItem |
getPropertyItem(int propid)
Gets the specified property item from this
Image. |
abstract PropertyItem[] |
getPropertyItems()
Gets all the property items (pieces of metadata) stored in this
Image. |
abstract ImageFormat |
getRawFormat()
Gets the file format of this
Image. |
Size |
getSize()
Gets the width and height, in pixels, of this image.
|
Object |
getTag()
Gets or sets an object that provides additional data about the image.
|
Image |
getThumbnailImage(int thumbWidth,
int thumbHeight,
Image.GetThumbnailImageAbort callback,
byte[] callbackData)
Returns a thumbnail for this
Image. |
float |
getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this
Image. |
abstract int |
getWidth()
Gets the width, in pixels, of this
Image. |
static boolean |
isAlphaPixelFormat(int pixfmt)
Returns a value that indicates whether the pixel format for this
Image contains alpha information. |
abstract void |
removePropertyItem(int propid)
Removes the specified property item from this
Image. |
abstract void |
rotateFlip(int rotateFlipType)
This method rotates, flips, or rotates and flips the
Image. |
void |
save(OutputStream stream,
ImageCodecInfo encoder,
EncoderParameters encoderParams)
Saves this image to the specified stream, with the specified encoder and image encoder parameters.
|
void |
save(OutputStream stream,
int format)
Saves this image to the specified stream in the specified format.
|
void |
save(String filename)
Saves this
Image to the specified file or stream. |
void |
save(String filename,
ImageCodecInfo encoder,
EncoderParameters encoderParams)
Saves this
Image to the specified file, with the specified encoder and image-encoder parameters. |
void |
save(String filename,
int format)
Saves this
Image to the specified file in the specified format. |
void |
saveAdd(EncoderParameters encoderParams)
Adds a frame to the file or stream specified in a previous call to the one of Image.Save(...) methods.
|
void |
saveAdd(Image image,
EncoderParameters encoderParams)
Adds a frame to the file or stream specified in a previous call to the one of Image.Save(...) methods.
|
int |
selectActiveFrame(FrameDimension dimension,
int frameIndex)
Selects the frame specified by the dimension and index.
|
abstract void |
setPalette(ColorPalette value)
Gets or sets the color palette used for this
Image. |
abstract void |
setPropertyItem(PropertyItem propitem)
Stores a property item (piece of metadata) in this
Image. |
void |
setTag(Object value)
Gets or sets an object that provides additional data about the image.
|
public Image()
Initializes a new instance of the Image class.
public abstract int getWidth()
Gets the width, in pixels, of this Image.
public abstract int getHeight()
Gets the height, in pixels, of this Image.
public final Size getSize()
Gets the width and height, in pixels, of this image.
Size(Image.getSize()) structure that represents the width and height, in pixels, of this image.public final float getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this Image.
public final float getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this Image.
public abstract ImageFormat getRawFormat()
Gets the file format of this Image.
ImageFormat that represents the file format of this Image.public abstract int getPixelFormat()
Gets the pixel format for this Image.
PixelFormat(Image.getPixelFormat()) that represents the pixel format for this Image.public abstract ColorPalette getPalette()
Gets or sets the color palette used for this Image.
ColorPalette that represents the color palette used for this Image.public abstract void setPalette(ColorPalette value)
Gets or sets the color palette used for this Image.
public final SizeF getPhysicalDimension()
Gets the width and height of this image.
public UUID[] getFrameDimensionsList()
Gets an array of GUIDs that represent the dimensions of frames within this Image.
Image
from most significant to least significant.public final int getFlags()
Gets the integer representing a bitwise combination of ImageFlags for this Image.
com.aspose.ms.System.NotImplementedException - The feature hasn't implemented yet
Value:
The integer value returned from this method will correspond to a sum of ImageFlags.public abstract int[] getPropertyIdList()
Gets IDs of the property items stored in this Image.
public abstract PropertyItem[] getPropertyItems()
Gets all the property items (pieces of metadata) stored in this Image.
PropertyItem objects, one for each property item stored in the image.public final Object getTag()
Gets or sets an object that provides additional data about the image.
public final void setTag(Object value)
Gets or sets an object that provides additional data about the image.
public static Image fromStream(InputStream stream)
Creates an Image from the specified data stream.
stream - A InputStream that contains the data for this Image.Image this method creates.public static Image fromStream(InputStream stream, boolean useEmbeddedColorManagement)
Creates an Image from the specified data stream, optionally using embedded
color management information in that stream.
stream - A InputStream that contains the data for this Image.useEmbeddedColorManagement - true to use color management information embedded in the data stream;
otherwise, false.Image this method creates.public static Bitmap fromHbitmap(byte[] hbitmap)
Creates a Bitmap from a handle to a GDI bitmap.
public static int getPixelFormatSize(int pixfmt)
Returns the color depth, in number of bits per pixel, of the specified pixel format.
pixfmt - The PixelFormat(Image.getPixelFormat()) member that specifies the format for which to find the size.public static boolean isAlphaPixelFormat(int pixfmt)
Returns a value that indicates whether the pixel format for this Image contains alpha information.
pixfmt - The PixelFormat(Image.getPixelFormat()) to test.pixfmt contains alpha information; otherwise, false.public final Image getThumbnailImage(int thumbWidth, int thumbHeight, Image.GetThumbnailImageAbort callback, byte[] callbackData)
Returns a thumbnail for this Image.
thumbWidth - The width, in pixels, of the requested thumbnail image.thumbHeight - The height, in pixels, of the requested thumbnail image.callback - A Image.GetThumbnailImageAbort delegate. Note You must create a delegate and pass a reference to the delegate as the callback parameter, but the delegate is not used.callbackData - Must be IntPtr.Zero.Image that represents the thumbnail.public void dispose()
Releases all resources used by this Image.
dispose in interface com.aspose.ms.System.IDisposablepublic final Object deepClone()
Creates an exact copy of this Image.
Image this method creates, cast as an object.public final RectangleF getBounds(int[] pageUnit)
Gets the bounds of the image in the specified unit.
pageUnit - One of the GraphicsUnit values indicating the unit of measure
for the bounding rectangle.RectangleF that represents the bounds of the image, in the specified unit.public final int getFrameCount(FrameDimension dimension)
Returns the number of frames of the specified dimension.
dimension - A FrameDimension that specifies the identity of the dimension type.public final void save(String filename)
Saves this Image to the specified file or stream.
filename - A string that contains the name of the file to which to save this Image.public final void save(String filename, int format)
Saves this Image to the specified file in the specified format.
filename - A string that contains the name of the file to which to save
this Image.format - The ImageFormat for this Image.public final void save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
Saves this Image to the specified file, with the specified encoder and image-encoder parameters.
filename - A string that contains the name of the file to which to save this Image.encoder - The ImageCodecInfo for this Image.encoderParams - An EncoderParameters to use for this Image.public final void save(OutputStream stream, int format)
Saves this image to the specified stream in the specified format.
stream - The InputStream where the image will be saved.format - An ImageFormat that specifies the format of the saved image.public final void save(OutputStream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
Saves this image to the specified stream, with the specified encoder and image encoder parameters.
stream - The InputStream where the image will be saved.encoder - The ImageCodecInfo for this Image.encoderParams - An EncoderParameters that specifies parameters used by the image encoder.public final void saveAdd(EncoderParameters encoderParams)
Adds a frame to the file or stream specified in a previous call to the one of Image.Save(...) methods. Use this method to save selected frames from a multiple-frame image to another multiple-frame image.
encoderParams - An EncoderParameters that holds parameters required by
the image encoder that is used by the save-add operation.public final void saveAdd(Image image, EncoderParameters encoderParams)
Adds a frame to the file or stream specified in a previous call to the one of Image.Save(...) methods.
image - An Image that contains the frame to add.encoderParams - An EncoderParameters that holds parameters
required by the image encoder that is used by the save-add operation.public abstract void rotateFlip(int rotateFlipType)
This method rotates, flips, or rotates and flips the Image.
rotateFlipType - A RotateFlipType member that specifies the type of rotation
and flip to apply to the image.public final int selectActiveFrame(FrameDimension dimension, int frameIndex)
Selects the frame specified by the dimension and index.
dimension - A FrameDimension that specifies the identity of the dimension type.frameIndex - The index of the active frame.public abstract PropertyItem getPropertyItem(int propid)
Gets the specified property item from this Image.
propid - The ID of the property item to get.PropertyItem this method gets.public abstract void removePropertyItem(int propid)
Removes the specified property item from this Image.
propid - The ID of the property item to remove.public abstract void setPropertyItem(PropertyItem propitem)
Stores a property item (piece of metadata) in this Image.
propitem - The PropertyItem to be stored.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.