<slide title="gdk-pixbuf: Loading" logo1="images/php-gtk.gif">

 <blurb fontsize="3em">
  Currently, an image can be loaded either from a file or from an in-memory
  buffer.
 </blurb>

 <example fontsize="1.7em"><![CDATA[<?php
  GdkPixbuf GdkPixbuf::new_from_file(string $filename)
?>]]></example>

 <blurb fontsize="3em">
  This function will automagically figure out the type of the file,
  load it, and return the GdkPixbuf class representing the image.
 </blurb>

 <example fontsize="1.7em"><![CDATA[<?php
  GdkPixbuf GdkPixbuf::new_from_data($data, $colorspace,
                                     $has_alpha, $bits_per_sample,
                                     $width, $height, $rowstride)
?>]]></example>

 <blurb fontsize="3em">
  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.
 </blurb>

</slide>
