RasterSurface
Overview
RasterSurface is a class in Aspose.Page FOSS for Python.
In-memory RGBA pixel surface.
This class provides 3 methods for working with RasterSurface objects in Python programs.
Available methods include: create, get_pixel, set_pixel.
All public members are accessible to any Python application after installing the Aspose.Page FOSS for Python package.
Properties: clip_mask, height, pixels, width.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
width | int | Read | Gets the width. |
height | int | Read | Gets the height. |
pixels | bytearray | Read | Gets the pixels. |
clip_mask | bytearray | None | Read | Gets the clip mask. |
Methods
| Signature | Description |
|---|---|
create(width: int, height: int, background: tuple[int, int, int, int]) → "RasterSurface" | |
set_pixel(x: int, y: int, color: tuple[int, int, int, int]) | Sets the pixel value. |
get_pixel(x: int, y: int) → tuple[int, int, int, int] |