Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: sharpening intermediate images  (Read 4814 times)

0 Members and 1 Guest are viewing this topic.

danibo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • boschungfoto
sharpening intermediate images
« 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
« Last Edit: March 10, 2007, 03:41:09 pm by Stramm »
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: sharpening intermediate images
« Reply #1 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....

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: sharpening intermediate images
« Reply #2 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: sharpening intermediate images
« Reply #3 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!
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: sharpening intermediate images
« Reply #4 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?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: sharpening intermediate images
« Reply #5 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))

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: sharpening intermediate images
« Reply #6 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 :)
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: sharpening intermediate images
« Reply #7 on: March 08, 2007, 11:20:15 pm »

works perfectly thank you stramm
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.