Watermarks displaying in wrong place.

RexM

Joined: 2005-01-11
Posts: 5
Posted: Tue, 2005-01-11 21:07

I'm having problems with the watermarks being placed in the correct place. I've trimmed the watermark image to be only as wide / high as needed and I have put it in the far bottom right corner in both the global and the individual photo. It still shows up around the bottom right, but way too close to the center of the image. If anyone has any ideas, please let me know, thank you.

Here is a link to the image I am refering to: http://syscrash.hopto.org/~rexm/photo/main.php/view/fordgt/ford_gt_011.jpg
----

Gallery URL: http://syscrash.hopto.org/~rexm/photo/
Gallery version: G2-alpha4
Webserver: Apache 2.0.52
Datatabase: MySQL 4.0.22
PHP version: 4.3.9
phpinfo URL: http://syscrash.hopto.org/~rexm/blog/info.php
Graphics Toolkit(s): NetPBM / GD
Operating system: Gentoo Linux
Web browser/version: Mozilla Firefox 1.0

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-11 22:49

the problem is because the drag-n-drop UI to place the watermark works on a scaled down version of the image and it records the % from the top and left where you placed the image.. when those %s are calculated against the full size of the image there is some margin of error.. ie, if you put the image right up against the left (or top) edge it should actually watermark there, but up against the right (or bottom) edge there may be some extra space. anyone have ideas on how to improve the UI for more accurate placement?

 
RexM

Joined: 2005-01-11
Posts: 5
Posted: Wed, 2005-01-12 01:30

Yes, there should be a better way to do it..

I have an idea, but do not know how to go about implementing it.

If you were to scale down the watermark image with the same ratio as the image you are watermarking in the drag-n-drop UI, wouldn't that make up for the margin of error?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-01-12 02:09

should work in theory.. not sure if we can modify the drag-n-drop javascript to scale the moving image though.
another thought is to always measure the distance from the closer side.. so if you put it at or near the right edge it would measure that distance instead of how far it is from the left side.. perhaps this would help.

you might want to file this as a bug on sourceforge so we don't lose track of it.

 
RexM

Joined: 2005-01-11
Posts: 5
Posted: Wed, 2005-01-12 02:12

ok, i'll go ahead and do that now, thanks.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-03-05 16:52

ok, i have refactored the placement calculation so it should behave more as you expect. try a nightly build from tomorrow or later...

 
staed

Joined: 2007-05-14
Posts: 3
Posted: Sat, 2007-07-14 10:02

Old thread, but similar problem.

I created a transparent PNG that I want to use as a watermark. I placed it in the bottom right corner, and it works great for landscape images, but it aligns in the bottom left corner for portraits.

Examples:

Landscape
[img]http://vagnretur.nu/misc/temp/landscape.jpg[/img]

Portrait
[img]http://vagnretur.nu/misc/temp/portrait.jpg[/img]

What am I doing wrong?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2007-07-14 15:28

the watermark UI doesn't have a way to specify you want the image right-aligned. i think you could manually modify the database to get that effect.