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: watermark with margin  (Read 4827 times)

0 Members and 1 Guest are viewing this topic.

Linosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
watermark with margin
« on: August 27, 2008, 11:30:05 pm »

I wanna place my watermark image bottom left, but it displayes with some pixles margin. Why is that and how do I change it?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: watermark with margin
« Reply #1 on: August 28, 2008, 08:42:10 am »

Why is that
Cause it's coded that way.

and how do I change it
You need to change the code responsible for that (picmgmnt.inc.php). The 'margin' is 5 px... so just search for 5 in function resize_image()
if you use gd2, then few lines below
Code: [Select]
        case "gd2" :
Code: [Select]
    $pos = $CONFIG['where_put_watermark'];
if ($pos == "northwest") {
$src_x = 5;
$src_y = 5;
} else if ($pos == "northeast") {
$src_x = $destWidth - ($logoW + 5);
$src_y = 5;
} else if ($pos == "southwest") {
$src_x = 5;
$src_y = $destHeight - ($logoH + 5);
} else if ($pos == "southeast") {
$src_x = $destWidth - ($logoW + 5);
$src_y = $destHeight - ($logoH + 5);
} else if ($pos == "center") {
$src_x = ($destWidth/2) - ($logoW/2);
$src_y = ($destHeight/2) - ($logoH/2);
}

Linosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: watermark with margin
« Reply #2 on: August 28, 2008, 10:21:57 am »

It worked, thanks a lot!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.