Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+26
View File
@@ -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();
}