File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -424,32 +424,4 @@ protected static function generateThumbnails($upload)
424424 $ img ->save (slashes ($ directory .'/ ' .$ info ['filename ' ].'_thumb100. ' .$ info ['extension ' ]));
425425 }
426426
427- public static function ridimensionaImmagini ($ upload )
428- {
429- $ info = $ upload ->info ;
430- $ directory = $ upload ->attachments_directory ;
431-
432- $ filepath = base_dir ().'/ ' .$ info ['dirname ' ].'/ ' .$ info ['filename ' ].'. ' .$ info ['extension ' ];
433-
434- if (!in_array (mime_content_type ($ filepath ), ['image/png ' , 'image/gif ' , 'image/jpeg ' ])) {
435- return ;
436- }
437-
438- $ driver = extension_loaded ('gd ' ) ? 'gd ' : 'imagick ' ;
439- ImageManagerStatic::configure (['driver ' => $ driver ]);
440-
441- $ img = ImageManagerStatic::make ($ filepath );
442-
443- // Correggi automaticamente l'orientamento dell'immagine
444- $ img ->orientate ();
445-
446- $ img ->resize (setting ('Larghezza per ridimensionamento immagini ' ), null , function ($ constraint ) {
447- $ constraint ->aspectRatio ();
448- });
449- $ img ->save (slashes ($ filepath ));
450-
451- clearstatcache ();
452- $ upload ->size = filesize (slashes ($ filepath ));
453- $ upload ->save ([],true );
454- }
455427}
You can’t perform that action at this time.
0 commit comments