Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -90,6 +90,32 @@ class _Imagemagick extends \IPS\Image
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
/* If possible, retain the color profiles when stripping EXIF data */
|
||||
if( \IPS\Settings::i()->imagick_strip_exif )
|
||||
{
|
||||
$imageColorProfiles = array();
|
||||
|
||||
try
|
||||
{
|
||||
$imageColorProfiles = $this->imagick->getImageProfiles( 'icc', true );
|
||||
}
|
||||
catch( \ImagickException $e ){}
|
||||
|
||||
$this->imagick->stripImage();
|
||||
|
||||
if( count( $imageColorProfiles ) )
|
||||
{
|
||||
foreach( $imageColorProfiles as $type => $profile )
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->imagick->profileImage( $type, $profile );
|
||||
}
|
||||
catch( \ImagickException $e ){}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (string) $this->imagick->getImagesBlob();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user