Changeset 13843 for trunk/include


Ignore:
Timestamp:
Apr 1, 2012, 2:02:36 AM (12 years ago)
Author:
plg
Message:

feature 2604: support rotation on derivatives

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dblayer/functions_mysql.inc.php

    r13038 r13843  
    371371    $separator = $is_first ? '' : ",\n    ";
    372372
    373     if (isset($value) and $value != '')
     373    if (isset($value) and $value !== '')
    374374    {
    375375      $query.= $separator.$key.' = \''.$value.'\'';
  • trunk/include/derivative.inc.php

    r13489 r13843  
    5656    if (!$this->size && isset($infos['width']) && isset($infos['height']))
    5757    {
    58       $this->size = array($infos['width'], $infos['height']);
     58      $width = $infos['width'];
     59      $height = $infos['height'];
     60
     61      // 1 or 5 =>  90 clockwise
     62      // 3 or 7 => 270 clockwise
     63      if ($infos['rotation'] % 2 != 0)
     64      {
     65        $width = $infos['height'];
     66        $height = $infos['width'];
     67      }
     68     
     69      $this->size = array($width, $height);
    5970    }
    6071  }
Note: See TracChangeset for help on using the changeset viewer.