* @return WideImage_TrueColorImage */ static function createTrueColorImage($width, $height) { return WideImage_TrueColorImage::create($width, $height); } /** * Check whether the given handle is a valid GD resource * * @param mixed $handle The variable to check * @return bool */ static function isValidImageHandle($handle) { return is_resource($handle) && get_resource_type($handle) == 'gd'; } /** * Throws exception if the handle isn't a valid GD resource * * @param mixed $handle The variable to check */ static function assertValidImageHandle($handle) { if (!self::isValidImageHandle($handle)) { throw new WideImage_InvalidImageHandleException("{$handle} is not a valid image handle."); } } } WideImage::checkGD(); WideImage::registerCustomMapper('WideImage_Mapper_BMP', 'image/bmp', 'bmp'); WideImage::registerCustomMapper('WideImage_Mapper_TGA', 'image/tga', 'tga');