* or converted) */ static function clear() { if (empty(self::$_cache) || DEBUGKEEPTEMP) { return; } foreach (self::$_cache as $file) { if (DEBUGPNG) { print "[clear unlink {$file}]"; } unlink($file); } } static function detect_type($file) { list($width, $height, $type) = dompdf_getimagesize($file); return $type; } static function type_to_ext($type) { $image_types = array(IMAGETYPE_GIF => "gif", IMAGETYPE_PNG => "png", IMAGETYPE_JPEG => "jpeg", IMAGETYPE_BMP => "bmp"); return isset($image_types[$type]) ? $image_types[$type] : null; } static function is_broken($url) { return $url === self::$broken_image; } } Image_Cache::$broken_image = DOMPDF_LIB_DIR . "/res/broken_image.png";