---
Product: psd
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/psd/python/size
---

# Size

## Overview

`Size` is a class in Aspose.PSD FOSS for Python.

This class declares 7 methods for Size objects in Python programs.
Available methods include: `__eq__`, `__hash__`, `__init__`, `__ne__`, `__str__`, `empty`, `equals`.
Public members are accessible to any Python application after installing the Aspose.PSD FOSS for Python package.
Properties: `Empty`, `IsEmpty`, `height`, `is_empty`, `width`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `is_empty` | `bool` | Read | Gets the is empty. |
| `IsEmpty` | `bool` | Read | Gets the is empty. |
| `Empty` | `Optional["Size"]` | Read | Gets the empty. |
| `width` | - | Read | Gets the width. |
| `height` | - | Read | Gets the height. |

## Methods

| Signature | Description |
|-----------|-------------|
| `empty()` | ` returns a `Size` instance with zero width and height, and the `is_empty` property reports true for such instances |
| `__init__(width: int, height: int)` | Calls __init__(width, height) on this Size instance. |
| `equals(other)` → `bool` | Calls equals(other) on this Size instance. |
| `__eq__(obj)` → `bool` | Calls __eq__(obj) on this Size instance. |
| `__hash__()` → `int` | Calls __hash__ on this Size instance. |
| `__str__()` → `str` | Calls __str__ on this Size instance. |
| `__ne__(other)` → `bool` | Calls __ne__(other) on this Size instance. |

## See Also

- [Aspose.PSD for Python — Enterprise API Reference](https://reference.aspose.com/psd/python-net/)