|
|
@ -109,6 +109,13 @@ abstract class Upload |
|
|
|
$greagwar_image = self::getGreagwarImage($tmp_file_path); |
|
|
|
} |
|
|
|
$image->type = $greagwar_image->guessType(); |
|
|
|
if (!Image::getIsSubClass($image)) { |
|
|
|
if ( !( ImageVariant::getIsClass( $image ) ) && Image::getIsSubClass( $image ) ) { |
|
|
|
$greagwar_image->resize( $width, $height, 0xffffff, $force = false, $rescale = false, $crop = true ); |
|
|
|
} else { |
|
|
|
$greagwar_image->resize( $width, $height, 0xffffff, $force = false, $rescale = false, $crop = false ); |
|
|
|
} |
|
|
|
} |
|
|
|
$hash = $greagwar_image->getHash($image->type, $quality = 100); |
|
|
|
$file_path = $greagwar_image->generateFileFromhash($hash) . '.' . $image->type; |
|
|
|
if (Image::getIsSubClass($image)) { |
|
|
@ -137,11 +144,6 @@ abstract class Upload |
|
|
|
ob_end_clean(); |
|
|
|
} else { |
|
|
|
if ($width || $height) { |
|
|
|
if (!(ImageVariant::getIsClass($image)) && Image::getIsSubClass($image)) { |
|
|
|
$greagwar_image->resize($width, $height, 0xffffff, $force = false, $rescale = false, $crop = true); |
|
|
|
} else { |
|
|
|
$greagwar_image->resize($width, $height, 0xffffff, $force = false, $rescale = false, $crop = false); |
|
|
|
} |
|
|
|
$file_path = $greagwar_image->cacheFile($image->type, $quality = 100, true); |
|
|
|
} |
|
|
|
} |
|
|
|