---
name: "CL_PNGProvider"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_PNGProvider"
---

# CL\_PNGProvider(3)

Surface provider that can load PNG (.png) files.

## NAME

CL\_PNGProvider - Surface provider that can load PNG (.png) files.

## CLASS MEMBERS

- CL\_InputSource\* **get\_input\_source**()

  - virtual unsigned int **get\_width**()

  - virtual unsigned int **get\_height**()

  - virtual unsigned int **get\_num\_frames**()

  - virtual EPixelFormat **get\_pixel\_format**()

  - virtual CL\_Palette \***get\_palette**()

  - virtual unsigned int **get\_src\_colorkey**()

  - virtual bool **uses\_src\_colorkey**()

  - virtual bool **is\_indexed**()

  - virtual unsigned int **get\_red\_mask**()

  - virtual unsigned int **get\_green\_mask**()

  - virtual unsigned int **get\_blue\_mask**()

  - virtual unsigned int **get\_alpha\_mask**()

  - virtual void \***get\_data**()

  - virtual void **perform\_lock**()

  - virtual void **perform\_unlock**()

  ## MEMBERS WITH DESCRIPTIONS

- CL\_InputSource\* **get\_input\_source**()

  ```
  Description:
  ```

  returns Pointer to CL\_InputSource(used by libpng-callback CL\_PNGProviderReturns the pitch of the image (bytes per line).

- virtual unsigned int **get\_width**()

  ```
  Description:
  ```

  Returns the width of the image.

- virtual unsigned int **get\_height**()

  ```
  Description:
  ```

  Returns the height of the image.

- virtual unsigned int **get\_num\_frames**()

  ```
  Description:
  ```

  Returns the number of subsprites in the image.

- virtual EPixelFormat **get\_pixel\_format**()

  ```
  Description:
  ```

  Returns the pixelformat used by the image.

- virtual CL\_Palette \***get\_palette**()

  ```
  Description:
  ```

  Returns the palette used by the image. NULL if system palette.

- virtual unsigned int **get\_src\_colorkey**()

  ```
  Description:
  ```

  Returns the transparency color used.

- virtual bool **uses\_src\_colorkey**()

  ```
  Description:
  ```

  Returns whether a source colorkey is used.

- virtual bool **is\_indexed**()

  ```
  Description:
  ```

  Returns whether the target uses an indexed color mode or not.

- virtual unsigned int **get\_red\_mask**()

  ```
  Description:
  ```

  Returns the red color mask used by the target.

- virtual unsigned int **get\_green\_mask**()

  ```
  Description:
  ```

  Returns the green color mask by the target.

- virtual unsigned int **get\_blue\_mask**()

  ```
  Description:
  ```

  Returns the blue color mask by the target.

- virtual unsigned int **get\_alpha\_mask**()

  ```
  Description:
  ```

  Returns the alpha mask by the target.

- virtual void \***get\_data**()

  ```
  Description:
  ```

  Returns the image data. Provider must be locked before pointer is valid.

- virtual void **perform\_lock**()

  ```
  Description:
  ```

  Locks the surface provider.

- virtual void **perform\_unlock**()

  ```
  Description:
  ```

  Unlocks the surface provider.Callback used by libpng to retrieve the filedata. (calls get\_input\_source()-\>read\_uchar8())

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
