Changeset 13315


Ignore:
Timestamp:
Feb 23, 2012, 12:10:34 PM (12 years ago)
Author:
plg
Message:

use JPEG compression quality settings for rotate photo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rotateImage/ws_functions.inc.php

    r13314 r13315  
    1717function ws_image_rotate($params, &$service)
    1818{
     19  global $conf;
     20 
    1921  if (!is_admin())
    2022  {
     
    5456
    5557  $img = new pwg_image($image_path);
     58  $img->set_compression_quality($conf['upload_form_websize_quality']);
    5659  $img->rotate($angle);
    5760  $img->write($image_path);
     
    6568  foreach ($sizes as $size) {
    6669    $resized_path = file_path_for_type($image_path,$size);
     70   
     71    $quality = $conf['upload_form_hd_quality'];
     72    if ('thumb' == $size) {
     73      $quality = $conf['upload_form_thumb_quality'];
     74    }
     75   
    6776    if (file_exists($resized_path)) {
    6877      $resized = new pwg_image($resized_path);
     78      $resized->set_compression_quality($quality);
    6979      $resized->rotate($angle);
    7080      $resized->write($resized_path);
Note: See TracChangeset for help on using the changeset viewer.