First of all, it is important to get imagemagick running, because it offers much more options to enhance images than gd-lib.
After I did this, I searched and found the pice of code, which does the resizing job. It is located at /include/functions_images.inc.php at around line 663
Code: Select all
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -resize '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile);I wanted to push up
brightness, saturation (with -modulate 105% and 150%), sharpness (by using a -unsharp-mask. The amount of sharpness is adjusted with the third parameter +1.0, leave the other two alone for output on screens. Very noisy images could use a 4th parameter called +threshold) and wanted to reduce
thumbnail-size (by using the option -quality).
It is recommended to do the sharpening at the end of image processing and thats why I inserted the sharpening in the end of the command line.
It results in the following code
Code: Select all
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -resize '. serendipity_escapeshellarg($newSize) .' -modulate 105,140 -unsharp 0.5x0.5+1.0 -quality 75 '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile);So I hope it helps you. I would like to suggest to the developers to add sharpenig with a unsharp mask as standard procedure in the offical code. A other option would be, to allow useres to add some extra command line parameters in the configuration an pass them to the resize command.
Side note: A good explanation of the parameters of the option -unsharp could be find here