/** * Load a GIF image from a file. * * \param $filename * Filename of the image to load. * * \return * A new AnewtImage instance */ public static function from_gif($filename) { assert('is_string($filename)'); $img = new AnewtImage(null, null, imagecreatefromgif($filename)); $img->set('filename', $filename); return $img; }
/** Show red image */ static function fill_red() { $img = new AnewtImage(300, 300); $img->fill($img->color_from_rgb(0xff, 0x0, 0x0)); $img->set('filename', 'foo.png'); $img->flush(); $img->destroy(); }