Currently, an image can be loaded either from a file or from an in-memory buffer.

<?php
  GdkPixbuf GdkPixbuf
::new_from_file(string $filename)
?>
This function will automagically figure out the type of the file, load it, and return the GdkPixbuf class representing the image.

<?php
  GdkPixbuf GdkPixbuf
::new_from_data($data$colorspace,
                                     
$has_alpha$bits_per_sample,
                                     
$width$height$rowstride)
?>
If you have already obtained the raw image data (currently only RGB images with 8 bits per sample are supported), this function can be used to create a GdkPixbuf for it. $colorspace has to be GDK_COLORSPACE_RGB, and $bits_per_sample - 8. $rowstride specifies distance in bytes between successive image rows.