Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 13:03

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Watermarks
PostPosted: 30. Mar 2008, 15:13 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
Having in the same directory :
-Images belonging to me ;
-Images belonging to somebody else, already fitted with their owner's watermark.

Would it be possible to put my own watermark ONLY over MY images ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 16:41 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
no - how would you distinguish between them?

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 16:52 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
"no - how would you distinguish between them?"

By using a list of names (simplest ?), or putting a special prefix/suffix on the names.


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 16:54 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
feel free to add this for you - a prefix would be quite simple.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 16:56 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
In which TWG script should it be done ?


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 16:58 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
inc/imagefunctions.inc.php look for the watermark function.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 30. Mar 2008, 17:00 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
Ok Michael, I'll look there.


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 13:28 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
Michael,
I tried the following change at the beginning of the watermark function :

function watermark($dst, $watermark, $width, $heigth, $info, $position)

{

// Michael Müller, 05.03.2004 17:05, www.php4u.net

// Positionen:

// 1 oben links

// 2 oben mittig

// 3 oben rechts

// 4 Mitte links

// 5 Mitte

// 6 Mitte rechts

// 7 unten links

// 8 unten mittig

// 9 unten rechts

// erlaubt sind png und jpeg

global $transparency;

global $t_x;

global $t_y;

global $charset;



$infos_img[0] = $width;

$infos_img[1] = $heigth;

$infos_img[2] = $info;



/******** PG *************/
$no_watermark_prefix="nowm";
if(stristr($dst, $no_watermark_prefix)) {
return;}

/************************/

if (isset($charset) && strtolower($charset == "utf-8")) {

$watermark = utf8_decode($watermark);

}

....

I still get the watermark on the prefixed image.

What am I doing wrong ?

Paul


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 13:46 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
have you deleted the images in the cache folder.
I only render this images once!

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 13:51 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
Yes, of course, I deleted the test images in cache.


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 13:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you can add "debug" with adding debug statemaint like debug("whatever"); to your code. This will be written in the log file - then you can trace easily whats going on.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 14:23 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
I did this :

/******** PG *************/
$no_watermark_prefix="nowm";
if(stristr($dst, $no_watermark_prefix)) {
debug("Watermark prefix found in".$dst);
return;}

/************************/

But no record in the debug log although I do have a prefixed image !

Paul


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 15:08 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
then it's not called at all.


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 15:30 
Offline

Joined: 30. Jul 2007, 18:23
Posts: 26
That's clear !
So where should I put this prefix test to eclude prefixed images to be watermarked (watermark image and/or watermark text) ?


Top
 Profile  
 
 Post subject:
PostPosted: 31. Mar 2008, 16:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
same file - where the watermark function is called - there is the image watermark and the text watermark done.

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy