IImage

All Implemented Interfaces: com.aspose.ms.System.IDisposable

public interface IImage extends System.IDisposable

Represents the raster or vector image.

Methods

MethodDescription
save(String filename)Save the image to the file.
save(String filename, int format)Save the image to the file.
save(OutputStream stream, int format)Save the image to the stream.
save(String filename, int format, int quality)Save the image to the file in the specified format and quality.
save(OutputStream stream, int format, int quality)Save the image to the stream in the specified format and quality.
getSize()Gets an image size.
getWidth()Gets the width of the image.
getHeight()Gets the height of the image.

save(String filename)

public abstract void save(String filename)

Save the image to the file.

Parameters:

ParameterTypeDescription
filenamejava.lang.String

save(String filename, int format)

public abstract void save(String filename, int format)

Save the image to the file.

Parameters:

ParameterTypeDescription
filenamejava.lang.String
formatint

save(OutputStream stream, int format)

public abstract void save(OutputStream stream, int format)

Save the image to the stream.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStream
formatint

save(String filename, int format, int quality)

public abstract void save(String filename, int format, int quality)

Save the image to the file in the specified format and quality.


The quality parameter can take values from 0 to 100 and only affects saving in ImageFormat.Jpeg.

For all other formats, this parameter is ignored.

Parameters:

ParameterTypeDescription
filenamejava.lang.String
formatint
qualityint

save(OutputStream stream, int format, int quality)

public abstract void save(OutputStream stream, int format, int quality)

Save the image to the stream in the specified format and quality.


The quality parameter can take values from 0 to 100 and only affects saving in ImageFormat.Jpeg.

For all other formats, this parameter is ignored.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStream
formatint
qualityint

getSize()

public abstract Size getSize()

Gets an image size.

Returns: Size

getWidth()

public abstract int getWidth()

Gets the width of the image.

Returns: int

getHeight()

public abstract int getHeight()

Gets the height of the image.

Returns: int