Updated on 2024-02-29 GMT+08:00

Converting Formats

You can use the GUI, code, or APIs to convert image formats. The original image can be converted into supported formats. For details, see Table 1.

  • Supported original formats: JPG, JPEG, PNG, BMP, WebP, GIF, and TIFF.
  • Supported target formats: JPG, PNG, BMP, and WebP.

Operation name: format

Table 1 Format conversion

Parameter

Value Description

Code Example

jpg

The image is saved in JPG format. If the original image is in vector formats such as WebP, BMP, and PNG, the transparent part will be padded to white.

image/format,jpg

webp

The image is saved in WebP format.

image/format,webp

bmp

The image is saved in BMP format.

image/format,bmp

png

The image is saved in PNG format.

image/format,png

Example

  • Save the original image of JPG format into PNG format.

    https://obs.region.example.com/image-demo/example.jpg?x-image-process=image/format,png