@@ 782-786 (lines=5) @@ | ||
779 | $heightOrig=imageSY($this->resource); |
|
780 | $process = imagecreatetruecolor($width, $height); |
|
781 | ||
782 | if ($process == false) { |
|
783 | OC_Log::write('core', __METHOD__.'(): Error creating true color image', OC_Log::ERROR); |
|
784 | imagedestroy($process); |
|
785 | return false; |
|
786 | } |
|
787 | ||
788 | // preserve transparency |
|
789 | if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { |
|
@@ 839-843 (lines=5) @@ | ||
836 | $targetHeight=$height; |
|
837 | } |
|
838 | $process = imagecreatetruecolor($targetWidth, $targetHeight); |
|
839 | if ($process == false) { |
|
840 | OC_Log::write('core', 'OC_Image->centerCrop. Error creating true color image', OC_Log::ERROR); |
|
841 | imagedestroy($process); |
|
842 | return false; |
|
843 | } |
|
844 | ||
845 | // preserve transparency |
|
846 | if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { |
|
@@ 879-883 (lines=5) @@ | ||
876 | return false; |
|
877 | } |
|
878 | $process = imagecreatetruecolor($w, $h); |
|
879 | if ($process == false) { |
|
880 | OC_Log::write('core', __METHOD__.'(): Error creating true color image', OC_Log::ERROR); |
|
881 | imagedestroy($process); |
|
882 | return false; |
|
883 | } |
|
884 | ||
885 | // preserve transparency |
|
886 | if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { |