|
@@ 1960-1966 (lines=7) @@
|
| 1957 |
|
$this->DebugMessage('source dimensions set to ' . $this->source_width . 'x' . $this->source_height, __FILE__, __LINE__); |
| 1958 |
|
$this->SetOrientationDependantWidthHeight(); |
| 1959 |
|
|
| 1960 |
|
if (!preg_match('#(' . implode('|', $this->AlphaCapableFormats) . ')#i', $outputFormat)) { |
| 1961 |
|
// not a transparency-capable format |
| 1962 |
|
$commandline .= ' -background ' . phpthumb_functions::escapeshellarg_replacement('#' . ($this->bg ?: 'FFFFFF')); |
| 1963 |
|
if ($getimagesize[2] == IMAGETYPE_GIF) { |
| 1964 |
|
$commandline .= ' -flatten'; |
| 1965 |
|
} |
| 1966 |
|
} |
| 1967 |
|
if ($getimagesize[2] == IMAGETYPE_GIF) { |
| 1968 |
|
$commandline .= ' -coalesce'; // may be needed for animated GIFs |
| 1969 |
|
} |
|
@@ 2120-2125 (lines=6) @@
|
| 2117 |
|
$this->DebugMessage('Using ImageMagick rotate', __FILE__, __LINE__); |
| 2118 |
|
$commandline .= ' -rotate ' . phpthumb_functions::escapeshellarg_replacement($this->ra); |
| 2119 |
|
if (($this->ra % 90) != 0) { |
| 2120 |
|
if (preg_match('#(' . implode('|', $this->AlphaCapableFormats) . ')#i', $outputFormat)) { |
| 2121 |
|
// alpha-capable format |
| 2122 |
|
$commandline .= ' -background rgba(255,255,255,0)'; |
| 2123 |
|
} else { |
| 2124 |
|
$commandline .= ' -background ' . phpthumb_functions::escapeshellarg_replacement('#' . ($this->bg ?: 'FFFFFF')); |
| 2125 |
|
} |
| 2126 |
|
} |
| 2127 |
|
$this->ra = 0; |
| 2128 |
|
} else { |