1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-01-17 11:08:14 +01:00

cleanup, removed code comments, codestyle

This commit is contained in:
Mikael Roos 2016-06-01 10:11:44 +02:00
parent cde8bab6e7
commit 32a23894d1

View File

@ -1706,9 +1706,6 @@ class CImage
&& ($this->width < $this->newWidth || $this->height < $this->newHeight)) {
$this->log("Resizing - smaller image, do not upscale.");
//$cropX = round(($this->cropWidth/2) - ($this->width/2));
//$cropY = round(($this->cropHeight/2) - ($this->height/2));
$posX = 0;
$posY = 0;
$cropX = 0;
@ -1739,7 +1736,6 @@ class CImage
$this->log(" cropY: $cropY");
$imageResized = $this->CreateImageKeepTransparency($this->newWidth, $this->newHeight);
//imagecopy($imageResized, $this->image, $posX, $posY, 0, 0, $this->width, $this->height);
imagecopy($imageResized, $this->image, $posX, $posY, $cropX, $cropY, $this->width, $this->height);
} else {
$cropX = round(($this->cropWidth/2) - ($this->newWidth/2));
@ -1822,7 +1818,6 @@ class CImage
$cropX = round(($this->width - $this->newWidth) / 2);
}
//$this->log("posX=$posX, posY=$posY, cropX=$cropX, cropY=$cropY.");
$imageResized = $this->CreateImageKeepTransparency($this->newWidth, $this->newHeight);
imagecopy($imageResized, $this->image, $posX, $posY, $cropX, $cropY, $this->width, $this->height);
$this->image = $imageResized;