Picture main tone information

Last updated:2020-08-21 18:14:29

Image Processing


Dominant image hue information

Interface

imgAve

Description:

You can retrieve dominant image hue to calculate average hue of an image, and the result will be returned in the form of 0xRRGGBB.
Image formats supported include: jpg, jpeg, bmp, png, webp, tiff, pcx, svg, ht, gif, wbmp
Image formats not supported include: ai, tga, psd, eps, raw, pcd

Permission

You need the GetObject permission for this operation. If the object you request does not exist, you may have the following two errors returned:

  • If you have the ListBucket permission on the bucket of this object, the status code 404 error will be returned;
  • If you don’t have the ListBucket permission on the bucket of this object, the status code 403 error will be returned.

Request:

Syntax
https://BucketName.${domain name of the region where the bucket is located}/[email protected]@tag=imgAve HTTP/1.1
Host: BucketName.${domain name of the region where the bucket is located}
Request parameters

The request requires no parameters.

Request header

The request does not require to set special header.

Response:

Response header
Header name Mandatory Description
Content-Type Yes MIME type, which is fixed as application/json
Response content

The response result is provided in Json string.

Field name Description
RGB Dominant image hue in 0xRRGGBB format.
Special error
HTTP status code Meaning
400 Wrong request message format
404 Resources not exist
403 Access denied
500 Operation at the server side fails.

Example

1. Enter the following request in Web browser:
https://ks3.ks3-cn-beijing.ksyun.com/image_deal/[email protected]@tag=imgAve

2. Get the result returned   
{
	"RGB":"0x6c6d74"
}

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

  • Insufficient
  • Outdated
  • Unclear or awkward
  • Redundant or clumsy
  • Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈