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

NameTypeAccessDescription
widthintReadGets the width.
heightintReadGets the height.
pixelsbytearrayReadGets the pixels.
clip_maskbytearray | NoneReadGets the clip mask.

Methods

SignatureDescription
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]

See Also