Help Center/ Object Storage Service/ User Guide/ Data Processing/ Image Processing/ Converting Formats and Interlacing Images
Updated on 2024-10-24 GMT+08:00

Converting Formats and Interlacing Images

Converting Formats

You can use the GUI or code mode on OBS Console or make an API call to convert images to different formats:

  • Supported original formats: JPG, JPEG, PNG, BMP, WebP, GIF, and TIFF
  • Supported target formats: JPG, PNG, BMP, and WebP (described in Table 1)

This operation is represented by 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 format such as WebP, BMP, or 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

Interlaced Image Loading

You can edit code on OBS Console or make an API call to load images in an interlaced way.

With format conversion, images are generated in baseline JPEG format by default. If you want to generate an image in progressive JPEG, use the interlace parameter. Table 2 describes the parameters.

  • Display of baseline JPG images: from top to bottom
  • Display of progressive JPEG images: from blurry to clearer and clearer

This operation is represented by interlace.

Table 2 Interlaced loading

Parameter

Value Description

Code Example

value

The value can be 0 or 1.

0: The output is a JPG image that is displayed from top to bottom.

1: The output is a JPEG image in an interlaced display.

image/format,jpg/interlace,1