Function: dvpp_jpeg_get_image_info

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

√

Atlas A2 products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Reads the width, height, and color channel count from the buffer that stores the JPEG image data.

Checks whether the image format supports decoding. For an unsupported stream, this API returns the error code ACL_ERROR_UNSUPPORTED_JPEG. See aclError for more details.

Prototype

  • C Prototype
    1
    aclError acldvppJpegGetImageInfo(const void *data, uint32_t size, uint32_t *width, uint32_t *height, int32_t *components)
    
  • Python Function
    1
    width, height, components, ret = acl.media.dvpp_jpeg_get_image_info(data, size)
    

Parameters

Parameter

Description

data

Int, address of the memory that stores the JPEG image.

size

Int, memory size, in bytes.

Return Values

Return Value

Description

width

Int, pointer address of the image width.

height

Int, pointer address of the image height.

components

Int, pointer address of the number of color channels.

ret

Int, error code: 0 on success; else, failure.