For Imagick only ....
in Graphics.subs.php
// Set jpeg image quality to 80
if ($default_formats[$preferred_format] === 'jpeg')
{
$imagick->setImageCompression(Imagick::COMPRESSION_JPEG);
$imagick->setImageCompressionQuality(80);
}
// Set jpeg image quality to 80
if ($default_formats[$preferred_format] === 'jpeg')
{
$imagick->borderImage('white', 0, 0);
$imagick->setImageCompression(Imagick::COMPRESSION_JPEG);
$imagick->setImageCompressionQuality(80);
}
So just adding in that $imagick->borderImage('white', 0, 0);
line should do the "trick"
Also note that 400 (or whatever size) you use is only enforced after the upload, as is the max size for all attachments. The addon updates the attachment form to allow it to accept a file as large as your server setting will allow and the group of files to the max as well (post_max_size and file_max_size values or whatever they are). This allows someone to upload their 5000 x 5000 x 6Mb cellphone pic and yet be resized (and possibly re-encoded) to fit to the ACP values. Capisce