forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: danibo on September 19, 2006, 03:45:16 pm

Title: sharpening intermediate images
Post by: danibo on September 19, 2006, 03:45:16 pm
Hallo
is there a way to sharpen the intermediate images as you can do it with Stramms Mod Pack for the Thumbnails?
My uploaded pictures are relativly big and the resizing to the intermediate images is a big step. (From 3000pix to 400 pix)
Thanks
dani
Title: Re: sharpening intermediate images
Post by: Stramm on September 19, 2006, 07:38:58 pm
if you use the modpack.... find in picmgmnt.inc.php
Code: [Select]
($CONFIG['thumb_use'] == "ex") ? $resize_method = "any" : $resize_method = $CONFIG['thumb_use'];
        if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate'] && !file_exists($normal)) {
            if ($CONFIG['enable_watermark'] == '1' && $CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'resized'){
if (!resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method, "true"))
                return false;
}
else {
if (!resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method, "false"))
            return false;
}
}
and replace with
Code: [Select]
($CONFIG['thumb_use'] == "ex") ? $resize_method = "any" : $resize_method = $CONFIG['thumb_use'];
        if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate'] && !file_exists($normal)) {
            if ($CONFIG['enable_watermark'] == '1' && $CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'resized'){
if (!resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method, "true", 1))
                return false;
}
else {
if (!resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method, "false",1 ))
            return false;
}
}

untested....
Title: Re: sharpening intermediate images
Post by: nickfzx on March 06, 2007, 02:41:24 am
I want to do exactly this...sharpen the intermediate images.

I have the latest (1.4.10 I think) version of the modpack.

do you think this will still work stramm ?

did it work danibo?
Title: Re: sharpening intermediate images
Post by: Joachim Müller on March 06, 2007, 08:01:01 am
do you think this will still work stramm ?
Why don't you just try and let us know instead of asking the obvious? Stramm posted the code change that is suppossed to do what you're up to, so yes: he probably thinks that this will work. There's only one way to actually find out: try it. Stop wasting our time!
Title: Re: sharpening intermediate images
Post by: nickfzx on March 06, 2007, 02:42:42 pm
sorry GauGau your right...it was getting kind of later when I posted that.

As it happens I can't seem to get it to work.

I followed the instructions and then used the admin tools to recreate all the intermediate images, but there is no difference in them...they have had no sharpening applied (I am sure of this as I loaded a couple first so I could do before and after comparisons)

Is there something else I have to do or is it the code?

Any thoughts?
Title: Re: sharpening intermediate images
Post by: Stramm on March 07, 2007, 07:45:45 pm
works for batch add and http upload, the admin tools need extra work

in util.php find
Code: [Select]
                if (resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], $watermark)) and replace with
Code: [Select]
                if (resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], $watermark, 1))
Title: Re: sharpening intermediate images
Post by: nickfzx on March 07, 2007, 07:48:46 pm
wow thanks stramm that is great...I can't test it tonight but I will try it out tomorrow.

Thanks for getting back to me :)
Title: Re: sharpening intermediate images
Post by: nickfzx on March 08, 2007, 11:20:15 pm
works perfectly thank you stramm