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
| Name | Type | Access | Description |
|---|---|---|---|
width | int | Read | Gets the image width in pixels. |
height | int | Read | Gets the image height in pixels. |
bounds | Rectangle | Read | Gets the image bounds. |
Methods
| Signature | Description |
|---|---|
getWidth() → int | Gets the image width in pixels. |
getHeight() → int | Gets the image height in pixels. |
getBounds() → Rectangle | Gets the image bounds. |
load(filePath: String) → Image | Loads a new image from the specified file path. |
load(stream: InputStream) → Image | Loads 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. |