Function ImageSurface.fromPng

Creates a new image surface and initializes the contents to the given PNG file.

Prototype

static ImageSurface fromPng(
  string file
);

Parameters

NameDescription
file name of PNG file to load

Note

Only available if cairo, cairoD and the cairoD user code were compiled with "version=CAIRO_HAS_PNG_FUNCTIONS"

Authors

Johannes Pfau cairoD
Andrej Mitrovic cairoD
cairo team cairo

Copyright

License

cairoD wrapper/bindings Boost License 1.0
cairo LGPL 2.1 / MPL 1.1