Image

Overview

Image is a class in Aspose.PSD FOSS for Java. Inherits from: AutoCloseable.

Provides the Aspose.PSD-compatible base image entry point for loading PSD/PSB documents.

This class declares 9 methods for Image objects in Java programs. Available methods include: close, dispose, getBounds, getHeight, getWidth, load, save. Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package. Properties: bounds, height, width.

Properties

NameTypeAccessDescription
widthintReadGets the image width in pixels.
heightintReadGets the image height in pixels.
boundsRectangleReadGets the image bounds.

Methods

SignatureDescription
getWidth() → intGets the image width in pixels.
getHeight() → intGets the image height in pixels.
getBounds() → RectangleGets the image bounds.
load(filePath: String) → ImageLoads a new image from the specified file path.
load(stream: InputStream) → ImageLoads a new image from the specified stream.
save(filePath: String)Saves the image data to the specified file path.
save(stream: OutputStream)Saves the image data to the specified stream.
dispose()Releases resources used by the image.
close()Calls close on this Image instance.

See Also