|
@@ 1701-1707 (lines=7) @@
|
| 1698 |
|
$this->DebugMessage('source dimensions set to '.$this->source_width.'x'.$this->source_height, __FILE__, __LINE__); |
| 1699 |
|
$this->SetOrientationDependantWidthHeight(); |
| 1700 |
|
|
| 1701 |
|
if (!preg_match('#('.implode('|', $this->AlphaCapableFormats).')#i', $outputFormat)) { |
| 1702 |
|
// not a transparency-capable format |
| 1703 |
|
$commandline .= ' -background '.phpthumb_functions::escapeshellarg_replacement('#'.($this->bg ? $this->bg : 'FFFFFF')); |
| 1704 |
|
if ($getimagesize[2] == IMAGETYPE_GIF) { |
| 1705 |
|
$commandline .= ' -flatten'; |
| 1706 |
|
} |
| 1707 |
|
} |
| 1708 |
|
if ($getimagesize[2] == IMAGETYPE_GIF) { |
| 1709 |
|
$commandline .= ' -coalesce'; // may be needed for animated GIFs |
| 1710 |
|
} |
|
@@ 1859-1864 (lines=6) @@
|
| 1856 |
|
$this->DebugMessage('Using ImageMagick rotate', __FILE__, __LINE__); |
| 1857 |
|
$commandline .= ' -rotate '.phpthumb_functions::escapeshellarg_replacement($this->ra); |
| 1858 |
|
if (($this->ra % 90) != 0) { |
| 1859 |
|
if (preg_match('#('.implode('|', $this->AlphaCapableFormats).')#i', $outputFormat)) { |
| 1860 |
|
// alpha-capable format |
| 1861 |
|
$commandline .= ' -background rgba(255,255,255,0)'; |
| 1862 |
|
} else { |
| 1863 |
|
$commandline .= ' -background '.phpthumb_functions::escapeshellarg_replacement('#'.($this->bg ? $this->bg : 'FFFFFF')); |
| 1864 |
|
} |
| 1865 |
|
} |
| 1866 |
|
$this->ra = 0; |
| 1867 |
|
} else { |