All Products
Search
Document Center

Object Storage Service:0040-00000225

Last Updated:Jul 21, 2023

Problem description

An invalid value is specified for the w parameter of the crop action.

Causes

The w parameter of the crop action is set to a non-number value or a number outside the value range.

Examples

GET /example_image?x-oss-process=image/crop,x_100,y_50,w_abc,h_100 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: application/xml

The error is returned for the preceding request because abc is not a valid value of the w parameter.

Solutions

GET /example_image?x-oss-process=image/crop,x_100,y_50,w_100,h_100 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: image/jpeg

Specify a valid parameter value for the crop action.

For more information, see Custom crop.

Examples

GET /example_image?x-oss-process=image/crop,x_100,y_50,w_-1,h_100 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: application/xml

The error is returned for the preceding request because -1 is outside the value range of the w parameter.

Solutions

GET /example_image?x-oss-process=image/crop,x_100,y_50,w_100,h_100 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: image/jpeg

Specify a valid parameter value for the crop action.

For more information, see Custom crop.

References

Custom crop