Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+42 -45
View File
@@ -113,55 +113,52 @@ abstract class _Image
$obj->setExifData( $contents );
/* If the image is misoriented, attempt to automatically reorient */
if( \IPS\Image::exifSupported() )
{
/* Differences in orientation between GD and ImageMagick can cause auto-reorient to not work properly */
$orientation = $obj->getImageOrientation();
if ( !( $obj instanceof Image\Imagemagick ) )
{
switch ( $orientation )
{
case 3:
$obj->rotate( 180 );
$obj->hasBeenRotated = TRUE;
break;
case 6:
$obj->rotate( -90 );
$obj->hasBeenRotated = TRUE;
break;
$orientation = $obj->getImageOrientation();
case 8:
$obj->rotate( 90 );
$obj->hasBeenRotated = TRUE;
break;
}
}
else
/* Differences in orientation between GD and ImageMagick can cause auto-reorient to not work properly */
if ( !( $obj instanceof Image\Imagemagick ) )
{
switch ( $orientation )
{
switch( $orientation )
{
case 3:
$obj->rotate( 180 );
$obj->hasBeenRotated = TRUE;
break;
case 6:
$obj->rotate( 90 );
$obj->hasBeenRotated = TRUE;
break;
case 8:
$obj->rotate( -90 );
$obj->hasBeenRotated = TRUE;
break;
}
case 3:
$obj->rotate( 180 );
$obj->hasBeenRotated = TRUE;
break;
case 6:
$obj->rotate( -90 );
$obj->hasBeenRotated = TRUE;
break;
case 8:
$obj->rotate( 90 );
$obj->hasBeenRotated = TRUE;
break;
}
/* ImageMagick requires orientation be reset when rotated */
$obj->setImageOrientation( 1 );
}
else
{
switch( $orientation )
{
case 3:
$obj->rotate( 180 );
$obj->hasBeenRotated = TRUE;
break;
case 6:
$obj->rotate( 90 );
$obj->hasBeenRotated = TRUE;
break;
case 8:
$obj->rotate( -90 );
$obj->hasBeenRotated = TRUE;
break;
}
}
/* ImageMagick requires orientation be reset when rotated */
$obj->setImageOrientation( 1 );
}
/* Return */