Hello Mick, here is the ticket https://tracker.phpbb.com/browse/PHPBB3-15456?filter=-2
The .jpg image can contain the original dimensions in the EXIF data. When a file is edited the software may not alter it. phpBB is reading the EXIF data instead of determining the the actual dimensions of the image. Saving as .png or .gif will strip the EXIF data. If you "save for web" or specifically remove the EXIF data in the .jpg the issue goes away.
Code: Select all
$file->move_file($destination, true);
Code: Select all
@passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -auto-orient -quality 85 -geometry 120x120' . ' "/full/path/to/your/forum/images/avatars/upload/' . $file->get('realname') . '" "/full/path/to/your/forum/images/avatars/upload/'' . $file->get('realname') . '"');
list($width, $height) = getimagesize('/full/path/to/your/forum/images/avatars/upload/'' . $file->get('realname'));