Compress image🔗

Compresses the pixel buffer of an image. This makes the image unprocessable by analysis tools, but may be useful for example in passing images over the network. To undo compression, use the convert colors tool.


  • image: Input image. Any image type works as input. Encoded (YUV, Bayer) are first decoded. If the image is already compressed, this tool does nothing.

  • format: The format of the compressed image buffer. “JPEG” and “PNG” are always supported, more formats may be available via plugins. The format is case-insensitive.


  • image: A compressed image.

  • compressionRate: Size of the compressed image divided by the size of the original image. This ratio is typically less than one. The smaller it is, the better the compression.