mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Changes for #305
This commit is contained in:
parent
e53e21857e
commit
81392ee8a0
2 changed files with 6 additions and 5 deletions
|
|
@ -206,7 +206,9 @@ trait Raw
|
|||
|
||||
if (!$bDownload)
|
||||
{
|
||||
$bDetectImageOrientation = !!$self->Config()->Get('labs', 'detect_image_exif_orientation', false);
|
||||
$bDetectImageOrientation = $self->Config()->Get('labs', 'image_exif_rotate', false)
|
||||
// Mostly only JPEG has EXIF metadata
|
||||
&& 'image/jpeg' == $sContentType;
|
||||
try
|
||||
{
|
||||
if ($bThumbnail)
|
||||
|
|
@ -218,8 +220,7 @@ trait Raw
|
|||
// $oImage->show('webp'); // Little Britain: "Safari says NO"
|
||||
exit;
|
||||
}
|
||||
else if ($bDetectImageOrientation &&
|
||||
\in_array($sContentType, array('image/png', 'image/jpeg', 'image/jpg', 'image/webp')))
|
||||
else if ($bDetectImageOrientation)
|
||||
{
|
||||
$oImage = static::loadImage($rResource, $bDetectImageOrientation);
|
||||
\header('Content-Disposition: inline; '.
|
||||
|
|
@ -292,7 +293,7 @@ trait Raw
|
|||
}, $sFolder, $iUid, $sMimeIndex);
|
||||
}
|
||||
|
||||
private static function loadImage($resource, bool $bDetectImageOrientation = true, int $iThumbnailBoxSize = 0) : \SnappyMail\Image
|
||||
private static function loadImage($resource, bool $bDetectImageOrientation = false, int $iThumbnailBoxSize = 0) : \SnappyMail\Image
|
||||
{
|
||||
if (\extension_loaded('gmagick')) { $handler = 'gmagick'; }
|
||||
else if (\extension_loaded('imagick')) { $handler = 'imagick'; }
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ Enables caching in the system'),
|
|||
'fast_cache_redis_host' => array('127.0.0.1'),
|
||||
'fast_cache_redis_port' => array(6379),
|
||||
'use_local_proxy_for_external_images' => array(true),
|
||||
'detect_image_exif_orientation' => array(false),
|
||||
'image_exif_rotate' => array(false),
|
||||
'cookie_default_path' => array(''),
|
||||
'cookie_default_secure' => array(false),
|
||||
'check_new_messages' => array(true),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue