API | Description |
Compresses an image in a specified bucket. |
imageMogr2
API to provide the image advanced compression feature.ci_download_compress_image(self, Bucket, Key, DestImagePath, CompressType, **kwargs)
# TPG compressionresponse = client.ci_download_compress_image(Bucket='examplebucket-1250000000',Key='sample.png',DestImagePath='sample.tpg',CompressType='tpg')# HEIF compressionresponse = client.ci_download_compress_image(Bucket='examplebucket-1250000000',Key='sample.png',DestImagePath='sample.heif',CompressType='heif')
Parameter | Description | Type | Required |
Bucket | String | Yes | |
Key | Object key. It can contain up to 128 bytes of letters, digits, spaces, plus signs, minus signs, underscores, equal signs, dots, colons, and slashes. | String | Yes |
DestImagePath | Local path to save the compressed image | String | Yes |
CompressType | Compression format, which can be TPG or HEIF. | String | Yes |
Was this page helpful?