IImage

IImage class

Represents a raster or vector image.

This interface provides a common abstraction for handling both raster and vector images.
Implementations may vary depending on the underlying image type.

IImage

NameDescription
IImage()

Returns: IImage


getHeight

NameDescription
getHeight ()Gets the height of the image in pixels.

Returns: int


getSize

NameDescription
getSize ()Gets the size of the image.

Returns: Dimension


getWidth

NameDescription
getWidth ()Gets the width of the image in pixels.

Returns: int


save

NameDescription
save (String)Saves the image to a file.

Parameters:

NameTypeDescription
filenameStringThe path to the file where the image will be saved.

save

NameDescription
save (String, int)Saves the image to a file in the specified format.

Parameters:

NameTypeDescription
filenameStringThe path to the file where the image will be saved.
formatintThe image format.

saveToStream

NameDescription
saveToStream (IImage, WriteStream, int)Saves the image to a stream in the specified format.

Parameters:

NameTypeDescription
iimageIImagelink to self
streamWriteStreamThe stream where the image will be saved.
formatintThe image format.

save

NameDescription
save (String, int, int)Saves the image to a file in the specified format and quality.

Parameters:

NameTypeDescription
filenameStringThe path to the file where the image will be saved.
formatintThe image format.
qualityintThe quality of the saved image (0 to 100). This parameter only affects saving in ImageFormat#Jpeg; for all other formats, it is ignored.

saveToStream

NameDescription
saveToStream (IImage, WriteStream, int, int)Saves the image to a stream in the specified format and quality.

Parameters:

NameTypeDescription
iimageIImagelink to self
streamWriteStreamThe stream where the image will be saved.
formatintThe image format.
qualityintThe quality of the saved image (0 to 100). This parameter only affects saving in ImageFormat#Jpeg; for all other formats, it is ignored.