示例#1
0
                         if (empty($params['h'])) {
                             $mode = IMAGE_EDITOR_RESIZE_WIDTH;
                         } else {
                             $mode = @coalesce($p['m'], IMAGE_EDITOR_RESIZE_PROPORTIONAL);
                         }
                     }
                     $thumb_width = (int) @coalesce($params['w'], $params['h']);
                     $thumb_height = (int) @coalesce($params['h'], $params['w']);
                     $IE->resize($thumb_width, $thumb_height, $mode);
                     break;
             }
             if (isset($params['b']) && $params['b']) {
                 $IE->blurred((int) $params['b']);
             }
             if (isset($params['d']) && $params['d']) {
                 $IE->decreaseBrightness((int) $params['d']);
             }
             $IE->commit();
         }
         $file_name = $cache_name;
     }
 }
 $last_modified = filemtime($file_name);
 if (!empty($file_name) && !empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $last_modified <= strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
     header('HTTP/1.0 304 Not Modified');
 } else {
     if (!empty($file_name)) {
         $size = getimagesize($file_name);
         header("Content-type: {$size['mime']}");
         header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $last_modified) . ' GMT');
         readfile($file_name);