From 902c0aaef8d4dbfea5f90ea44eec2a34704859f6 Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Sun, 6 Dec 2015 12:40:54 +0100 Subject: [PATCH] generate new bundles --- webroot/imgd.php | 34 +++++++++++++++++----------------- webroot/imgp.php | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/webroot/imgd.php b/webroot/imgd.php index 7125e49..fa060bb 100755 --- a/webroot/imgd.php +++ b/webroot/imgd.php @@ -1545,7 +1545,7 @@ class CImage private function normalizeFileExtension($extension = null) { $extension = strtolower($extension ? $extension : $this->extension); - + if ($extension == 'jpeg') { $extension = 'jpg'; } @@ -1567,7 +1567,7 @@ class CImage if (!$this->isRemoteSourceOnWhitelist($src)) { throw new Exception("Hostname is not on whitelist for remote sources."); } - + $remote = new CRemoteImage(); $cache = $this->saveFolder . "/remote/"; @@ -2242,7 +2242,7 @@ class CImage if ($this->copyStrategy === self::RESIZE) { $copyStrat = "_rs"; } - + $width = $this->newWidth ? '_' . $this->newWidth : null; $height = $this->newHeight ? '_' . $this->newHeight : null; @@ -2293,8 +2293,8 @@ class CImage $subdir = ($subdir == '.') ? '_.' : $subdir; $subdir .= '_'; } - - $file = $prefix . $subdir . $filename . $width . $height + + $file = $prefix . $subdir . $filename . $width . $height . $offset . $crop . $cropToFit . $fillToFit . $crop_x . $crop_y . $upscale . $quality . $filters . $sharpen . $emboss . $blur . $palette @@ -2364,7 +2364,7 @@ class CImage if ($this->image === false) { throw new Exception("Could not load image."); } - + /* Removed v0.7.7 if (image_type_to_mime_type($this->fileType) == 'image/png') { $type = $this->getPngType(); @@ -2404,14 +2404,14 @@ class CImage public function getPngType($filename = null) { $filename = $filename ? $filename : $this->pathToImage; - + $pngType = ord(file_get_contents($filename, false, null, 25, 1)); if ($this->verbose) { $this->log("Checking png type of: " . $filename); $this->log($this->getPngTypeAsString($pngType)); } - + return $pngType; } @@ -2435,7 +2435,7 @@ class CImage $index = imagecolortransparent($this->image); $transparent = null; if ($index != -1) { - $transparent = " (transparent)"; + $transparent = " (transparent)"; } switch ($pngType) { @@ -3142,7 +3142,7 @@ class CImage $index = $this->image ? imagecolortransparent($this->image) : -1; - + if ($index != -1) { imagealphablending($img, true); @@ -3210,8 +3210,8 @@ class CImage return substr(image_type_to_extension($this->fileType), 1); } } - - + + /** * Save image. @@ -3364,7 +3364,7 @@ class CImage $colorspace = $image->getImageColorspace(); $this->log(" Current colorspace: " . $colorspace); - $profiles = $image->getImageProfiles('*', false); + $profiles = $image->getImageProfiles('*', false); $hasICCProfile = (array_search('icc', $profiles) !== false); $this->log(" Has ICC color profile: " . ($hasICCProfile ? "YES" : "NO")); @@ -3373,13 +3373,13 @@ class CImage $sRGBicc = file_get_contents($iccFile); $image->profileImage('icc', $sRGBicc); - + $image->transformImageColorspace(Imagick::COLORSPACE_SRGB); $image->writeImage($this->cacheFileName); return $this->cacheFileName; } } - + return false; } @@ -3502,7 +3502,7 @@ class CImage $this->log("Content-type: " . $mime); $this->log("Content-length: " . $size); $this->verboseOutput(); - + if (is_null($this->verboseFileName)) { exit; } @@ -3554,7 +3554,7 @@ class CImage $details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ; $details['memoryCurrent'] = round(memory_get_usage()/1024/1024, 3) . " MB"; $details['memoryLimit'] = ini_get('memory_limit'); - + if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { $details['loadTime'] = (string) round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']), 3) . "s"; } diff --git a/webroot/imgp.php b/webroot/imgp.php index c73b541..734ad8a 100755 --- a/webroot/imgp.php +++ b/webroot/imgp.php @@ -1545,7 +1545,7 @@ class CImage private function normalizeFileExtension($extension = null) { $extension = strtolower($extension ? $extension : $this->extension); - + if ($extension == 'jpeg') { $extension = 'jpg'; } @@ -1567,7 +1567,7 @@ class CImage if (!$this->isRemoteSourceOnWhitelist($src)) { throw new Exception("Hostname is not on whitelist for remote sources."); } - + $remote = new CRemoteImage(); $cache = $this->saveFolder . "/remote/"; @@ -2242,7 +2242,7 @@ class CImage if ($this->copyStrategy === self::RESIZE) { $copyStrat = "_rs"; } - + $width = $this->newWidth ? '_' . $this->newWidth : null; $height = $this->newHeight ? '_' . $this->newHeight : null; @@ -2293,8 +2293,8 @@ class CImage $subdir = ($subdir == '.') ? '_.' : $subdir; $subdir .= '_'; } - - $file = $prefix . $subdir . $filename . $width . $height + + $file = $prefix . $subdir . $filename . $width . $height . $offset . $crop . $cropToFit . $fillToFit . $crop_x . $crop_y . $upscale . $quality . $filters . $sharpen . $emboss . $blur . $palette @@ -2364,7 +2364,7 @@ class CImage if ($this->image === false) { throw new Exception("Could not load image."); } - + /* Removed v0.7.7 if (image_type_to_mime_type($this->fileType) == 'image/png') { $type = $this->getPngType(); @@ -2404,14 +2404,14 @@ class CImage public function getPngType($filename = null) { $filename = $filename ? $filename : $this->pathToImage; - + $pngType = ord(file_get_contents($filename, false, null, 25, 1)); if ($this->verbose) { $this->log("Checking png type of: " . $filename); $this->log($this->getPngTypeAsString($pngType)); } - + return $pngType; } @@ -2435,7 +2435,7 @@ class CImage $index = imagecolortransparent($this->image); $transparent = null; if ($index != -1) { - $transparent = " (transparent)"; + $transparent = " (transparent)"; } switch ($pngType) { @@ -3142,7 +3142,7 @@ class CImage $index = $this->image ? imagecolortransparent($this->image) : -1; - + if ($index != -1) { imagealphablending($img, true); @@ -3210,8 +3210,8 @@ class CImage return substr(image_type_to_extension($this->fileType), 1); } } - - + + /** * Save image. @@ -3364,7 +3364,7 @@ class CImage $colorspace = $image->getImageColorspace(); $this->log(" Current colorspace: " . $colorspace); - $profiles = $image->getImageProfiles('*', false); + $profiles = $image->getImageProfiles('*', false); $hasICCProfile = (array_search('icc', $profiles) !== false); $this->log(" Has ICC color profile: " . ($hasICCProfile ? "YES" : "NO")); @@ -3373,13 +3373,13 @@ class CImage $sRGBicc = file_get_contents($iccFile); $image->profileImage('icc', $sRGBicc); - + $image->transformImageColorspace(Imagick::COLORSPACE_SRGB); $image->writeImage($this->cacheFileName); return $this->cacheFileName; } } - + return false; } @@ -3502,7 +3502,7 @@ class CImage $this->log("Content-type: " . $mime); $this->log("Content-length: " . $size); $this->verboseOutput(); - + if (is_null($this->verboseFileName)) { exit; } @@ -3554,7 +3554,7 @@ class CImage $details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ; $details['memoryCurrent'] = round(memory_get_usage()/1024/1024, 3) . " MB"; $details['memoryLimit'] = ini_get('memory_limit'); - + if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { $details['loadTime'] = (string) round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']), 3) . "s"; }