Skip to main content

Module jpeg_encoder

Module jpeg_encoder 

Expand description

Encoding of images into the JPEG format, with configurable quality, downsampling, and alpha handling.

Structs§

Options
JPEG encoding options.

Enums§

Downsample
The downsampling factor for the U and V components.

Functions§

encode
Encode the src pixels to the dst stream. options may be used to control the encoding behavior.
encode_image
Encode the provided image and return the resulting bytes. If the image was created as a texture-backed image on a GPU context, that context must be provided so the pixels can be read before being encoded. For raster-backed images, context can be None. options may be used to control the encoding behavior.
encode_pixmap
Returns the encoded data for the pixmap, or None on failure.
encode_yuva_pixmaps
Encode the src pixels to the dst stream. options may be used to control the encoding behavior.

Type Aliases§

AlphaOption
How to handle input images with alpha (JPEGs must be opaque).