mirror of
https://github.com/processwire/processwire.git
synced 2025-08-22 14:23:05 +02:00
remove debug code
This commit is contained in:
@@ -182,8 +182,7 @@ class ImageSizerEngineIMagick extends ImageSizerEngine {
|
|||||||
protected function processResize($srcFilename, $dstFilename, $fullWidth, $fullHeight, $finalWidth, $finalHeight) {
|
protected function processResize($srcFilename, $dstFilename, $fullWidth, $fullHeight, $finalWidth, $finalHeight) {
|
||||||
|
|
||||||
$this->setTimeLimit(120);
|
$this->setTimeLimit(120);
|
||||||
my_var_dump([$srcFilename, $dstFilename, $fullWidth, $fullHeight, $finalWidth, $finalHeight]);
|
|
||||||
die('RIP');
|
|
||||||
// start image magick
|
// start image magick
|
||||||
$this->im = new \IMagick();
|
$this->im = new \IMagick();
|
||||||
|
|
||||||
@@ -361,14 +360,10 @@ die('RIP');
|
|||||||
$this->im->setImageDepth(($this->imageDepth > 8 ? 8 : $this->imageDepth));
|
$this->im->setImageDepth(($this->imageDepth > 8 ? 8 : $this->imageDepth));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// prepare to save file(s)
|
// prepare to save file(s)
|
||||||
if($this->webpAdd) {
|
if($this->webpAdd) {
|
||||||
$this->imWebp = clone $this->im;
|
$this->imWebp = clone $this->im;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->im->setImageFormat($this->imageFormat);
|
$this->im->setImageFormat($this->imageFormat);
|
||||||
$this->im->setImageType($this->imageType);
|
$this->im->setImageType($this->imageType);
|
||||||
if(in_array(strtoupper($this->imageFormat), array('JPG', 'JPEG'))) {
|
if(in_array(strtoupper($this->imageFormat), array('JPG', 'JPEG'))) {
|
||||||
@@ -383,37 +378,6 @@ die('RIP');
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write to file(s)
|
// write to file(s)
|
||||||
$result = false;
|
|
||||||
switch($this->imageType) {
|
|
||||||
|
|
||||||
case \IMAGETYPE_GIF:
|
|
||||||
// optionally save an additional WebP file
|
|
||||||
|
|
||||||
// save the final GIF image file
|
|
||||||
#$result = imagegif($thumb, $dstFilename);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case \IMAGETYPE_PNG:
|
|
||||||
// optionally save an additional WebP file
|
|
||||||
if($this->webpAdd) {
|
|
||||||
#$resultWebp = $this->imSaveWebP($thumb, $srcFilename, $this->webpQuality);
|
|
||||||
}
|
|
||||||
|
|
||||||
// save the final PNG image file and always use highest compression level (9) per @horst
|
|
||||||
#$result = imagepng($thumb, $dstFilename, 9);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case \IMAGETYPE_JPEG:
|
|
||||||
// optionally save an additional WebP file
|
|
||||||
if($this->webpAdd) {
|
|
||||||
#$resultWebp = $this->imSaveWebP($thumb, $srcFilename, $this->webpQuality);
|
|
||||||
}
|
|
||||||
|
|
||||||
// save the final JPEG image file
|
|
||||||
#$result = imagejpeg($thumb, $dstFilename, $this->quality);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// save to file
|
|
||||||
$this->wire('files')->unlink($dstFilename);
|
$this->wire('files')->unlink($dstFilename);
|
||||||
@clearstatcache(dirname($dstFilename));
|
@clearstatcache(dirname($dstFilename));
|
||||||
##if(!$this->im->writeImage($this->destFilename)) {
|
##if(!$this->im->writeImage($this->destFilename)) {
|
||||||
|
Reference in New Issue
Block a user