Function: dvpp_png_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

Obtains the width and height of a PNG image from the image memory.

Prototype

  • C Prototype
    1
    aclError acldvppPngGetImageInfo(const void *data, uint32_t dataSize, uint32_t *width, uint32_t *height,int32_t *components)
    
  • Python Function
    1
    width, height, components, ret = acl.media.dvpp_png_get_image_info(data, data_size)
    

Parameters

Parameter

Description

data

Int, pointer address of the buffer that stores the PNG image data.

data_size

Int, buffer size, in bytes.

Return Values

Return Value

Description

width

Int, image width.

height

Int, image height.

components

Int, number of color channels.

ret

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