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
srcpixels to thedststream.optionsmay 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
contextmust be provided so the pixels can be read before being encoded. For raster-backed images,contextcan beNone.optionsmay be used to control the encoding behavior. - encode_
pixmap - Returns the encoded data for the pixmap, or
Noneon failure. - encode_
yuva_ pixmaps - Encode the
srcpixels to thedststream.optionsmay be used to control the encoding behavior.
Type Aliases§
- Alpha
Option - How to handle input images with alpha (JPEGs must be opaque).