With that lil modifications it's possible to sharpen the thumbnails. This way they look far better. Also it's possible to crop thumbnails. Means you set an exact width and height and all thumbs have the same dimensions.
The sharpen function works like the Photoshop or Gimp unsharp mask. If preset decent values. All can be turned on and off in admin. If you change thumb dimensions remember that you'll have to use the admin tools to recreate them. To enable cropping set 'Use dimension ( width or height or Max aspect for thumbnail )' to exact and set the width and height.
Sharpening doesn't work with GD1! That hack's for 1.32, 1.33
downloadable already edited files
http://forum.coppermine-gallery.net/index.php?topic=21469.0demo
http://stramm.mine.nuLet's get started
first the necessary SQL. Please use a tool like PHPMyAdmin or similar to update your SQL. Change the prefix cpg_ to whatever you use
insert into cpg_config (name, value) values ('enable_unsharp', '0');
insert into cpg_config (name, value) values ('unsharp_amount', '80');
insert into cpg_config (name, value) values ('unsharp_radius', '0.5');
insert into cpg_config (name, value) values ('unsharp_threshold', '3');
insert into cpg_config (name, value) values ('thumb_height', '120');
open lang/english.php
find
'th_wd' => 'Width',
below add
'th_ex' => 'Exact',
find
array('Max dimension of a thumbnail <a href="#notice2" class="clickable_option">**</a>', 'thumb_width', 0), //cpg1.3.0
replace with
array('Max dimension (width) of a thumbnail <a href="#notice2" class="clickable_option">**</a>', 'thumb_width', 0), //cpg1.3.0
array('Height of a thumbnail (if you use exact)', 'thumb_height', 0), //cpg1.3.0
find
array('Max width or height for uploaded pictures/videos (pixels)', 'max_upl_width_height', 0), //cpg1.3.0
below add
'Thumb Sharpening',
array('Enable Unsharp Mask', 'enable_unsharp', 1),
array('Amount', 'unsharp_amount', 0),
array('Radius', 'unsharp_radius', 0),
array('Threshold', 'unsharp_threshold', 0),
in util.php find (if you're using my watermark hack skip this)
if (resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'])) {
replace with
if (resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], 1)) {
if you're using my watermark hack then find in util.php instead
if (resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false")) {
replace with
if (resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false", 1)) {
if you're using the better admin tools hack for my watermark mod then find in updatethumbs.php
if (resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false")) {
and replace with
if (resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false", 1)) {
in functions.inc.php find
function compute_img_size($width, $height, $max)
replace with
function compute_img_size($width, $height, $max, $normal="")
find
if($thumb_use=='ht') {
$image_size['geom'] = ' height="'.$image_size['height'].'"';
} elseif($thumb_use=='wd') {
$image_size['geom'] = 'width="'.$image_size['width'].'"';
below add
} elseif($thumb_use=='ex') {
if ($normal=="normal"){
$image_size['geom'] = 'width="'.$image_size['width'].'" height="'.$image_size['height'].'"';
}
elseif ($normal=="cat_thumb"){
$image_size['geom'] = 'width="'.$max.'" height="'.$max.'"';
}
else {
$image_size['geom'] = 'width="'.$CONFIG['thumb_width'].'" height="'.$CONFIG['thumb_height'].'"';
}
in displayimage.php find
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
replace with
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width'], "normal");
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
below add
}elseif($CONFIG['thumb_use']=='ex' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
in config.php find
$wd_selected = ($value == 'wd') ? 'selected' : '';
below add
$ex_selected = ($value == 'ex') ? 'selected' : '';
find
<option value="any" $any_selected>{$lang_config_php['th_any']}</option>
<option value="ht" $ht_selected>{$lang_config_php['th_ht']}</option>
<option value="wd" $wd_selected>{$lang_config_php['th_wd']}</option>
below add
<option value="ex" $ex_selected>{$lang_config_php['th_ex']}</option>
in index.php
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
with
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], "cat_thumb");
Now just replace your picmgmnt.inc.php with the attached one. Have fun... oh.. and I don't mind to get feedback

Watermark users please use the watermark_picmgmnt.inc.php
examples: orig pics are 640x480... all cropped to 140x140. First without unsharpen mask, the other sharpened (100, 0.5, 3)
(http://img.villagephotos.com/p/2005-8/1058028/1_cropped140x140_normal.jpg) (http://img.villagephotos.com/p/2005-8/1058028/1_cropped140x140_sharpened.jpg) (http://img.villagephotos.com/p/2005-8/1058028/2_cropped140x140_normal.jpg) (http://img.villagephotos.com/p/2005-8/1058028/2_cropped140x140_sharpened.jpg)