Compression
Image Compression Formats¶
Here are some examples for image compression on-the-fly with size comparison before and after compression.
JPEG¶
JPEG is a lossy image compression algorithm, which means that JPEG affects the visual precision of the compressed image. In Inteliver JPEG compression API, you can set the compression level (image quality) from a range of [0, 100].
Level zero result in a very small image size while affecting the visual precision alot. Level one hundred will result in the best quality image with biggest size.
JPEG Compression (Quality Level: 80)¶
i_o_format_jpg_80

JPEG Compression (Quality Level: 40)¶
i_o_format_jpg_40

JPEG Compression (Quality Level: 20)¶
i_o_format_jpg_20

WEBP¶
Webp is a lossy image compression algorithm, which means that Webp affects the visual precision of the compressed image. In Inteliver Webp compression API, you can set the compression level (image quality) from a range of [0, 100].
Level zero result in a very small image size while affecting the visual precision alot. Level one hundred will result in the best quality image with biggest size.
WEBP Compression (Quality Level: 80)¶
i_o_format_webp_80

WEBP Compression (Quality Level: 40)¶
i_o_format_webp_40

WEBP Compression (Quality Level: 20)¶
i_o_format_webp_20

PNG¶
PNG is a lossless image compression algorithm. The PNG compression will not affect the visual precision of the image and after decoding the compressed image is identical to the original one. Hoewever, the compression level is a trade-off between file size and encoding/decoding speed.
In Inteliver PNG compression API, you can set the compression level from a range of [1, 9] where level-1 produces the biggest file size and fastest decoding mode and level-9 result in the samllest file size with the slowest decoding time.