Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2021-09-14 16:17:55
imageInfo
You can call this operation to query the basic information of an image, including its format, size, width, height, color model, and number of frames. The result is returned in JSON format.
Image formats are means of storing images in computers. Image formats include BMP, JPG, TIFF, GIF, PCX, TGA, Exif, FPX, SVG, PSD, CDR, PCD, DXF, UFO, EPS, AI, and RAW.
The image size is the size of the storage space used by an image in bytes (B), kilobytes (KB), and megabytes (MB). The size greater than 1,024 B will be converted to the size in KB, and the size greater than 1,024 KB will be converted to the size in MB.
The image width and height are expressed in pixels.
The color model, also known as color pattern, is an algorithm for representing colors in the digital world. Colors are usually divided into several components to represent colors in a digital way. Different coloring mechanisms differentiate devices that synthesize colors by using color lights such as displays, projectors, and scanners from devices that use pigments such as printers and printing machines. General color models include HSB, RGB, Lab, and CMYK.
To call this operation, you must have the GetObject permission. If the object does not exist, the following errors may be returned:
https://BucketName.${Endpoint of the bucket}/object@base@tag=imageInfo HTTP/1.1
Host: BucketName.${Endpoint of the bucket}
You do not need to set parameters for this request.
The request does not require a special header.
Header | Required | Description |
---|---|---|
Content-Type | Yes | The MIME type, which is fixed to application/json. |
Field | Description |
---|---|
Format | The format of the image, such as PNG, JPG, GIF, and BMP. |
Size | The size of the storage space used by the image. Unit: B, KB, and MB. |
Width | The width of the image. Unit: pixels. |
Height | The height of the image. Unit: pixels. |
colorModel | The color model of the image. General color models include HSB, RGB, Lab and CMYK. |
frameNumber | The number of frames of the image. This field is returned when the image is a GIF image. |
HTTP status code | Description |
---|---|
400 | The request format is incorrect. |
404 | The specified resource does not exist. |
403 | The access is denied. |
500 | An internal server error occurred. |
1. Enter the following request in the address bar of your web browser:
https://ks3.ks3-cn-beijing.ksyuncs.com/image_deal/kssyun.png@base@tag=imageInfo
2. Sample response
{
"colorModel":"TrueColor",
"format":"JPEG",
"height":2448,
"size":"1.8M",
"width":3264
}
Pure Mode