@@ 904-908 (lines=5) @@ | ||
901 | } |
|
902 | ||
903 | imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height); |
|
904 | if ($process == false) { |
|
905 | $this->logger->error('OC_Image->centerCrop, Error re-sampling process image ' . $width . 'x' . $height, array('app' => 'core')); |
|
906 | imagedestroy($process); |
|
907 | return false; |
|
908 | } |
|
909 | imagedestroy($this->resource); |
|
910 | $this->resource = $process; |
|
911 | return true; |
|
@@ 943-947 (lines=5) @@ | ||
940 | } |
|
941 | ||
942 | imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h); |
|
943 | if ($process == false) { |
|
944 | $this->logger->error(__METHOD__ . '(): Error re-sampling process image ' . $w . 'x' . $h, array('app' => 'core')); |
|
945 | imagedestroy($process); |
|
946 | return false; |
|
947 | } |
|
948 | imagedestroy($this->resource); |
|
949 | $this->resource = $process; |
|
950 | return true; |