Function: dvpp_png_get_image_info

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

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)
    

Parameter Description

Parameter

Description

data

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

data_size

Int, memory size, in bytes.

Return Value Description

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.