Skip to content

MPS Lossless Image Compression Docs Now Live โ€‹

Updated

The integration guide for lossless compression in MPS image processing is now live. It uses the existing ProcessImage API โ€” set ImageTask.EncodeConfig.ImageEncodeConfig to re-encode an image and cut its size substantially while keeping it visually lossless.

ParameterDescription
FormatOutput format. Defaults to the source format; the doc examples use AVIF
QualityRelative quality 1โ€“100 (relative to the source image). Defaults to the source quality

1. Measured Compression โ€‹

Results from testing two large images with AVIF + Quality=50:

ImageOriginal (MB)Compressed (MB)Size reduction
Image A (2752ร—1536)4.541.0776.3%
Image B (550ร—3072)16.473.5978.2%

These are reference values. Compression depends heavily on image content โ€” verify with your own assets.

2. Before You Start โ€‹

  • "Lossless" here means visually lossless, not bit-exact mathematical lossless compression.

  • To compress without changing dimensions, omit TransformConfig entirely.

  • If OutputStorage is omitted, the output inherits the storage location of the input file.

  • Lossless Image Compression API docs

Built with VitePress ยท Deployed on Tencent EdgeOne Pages