RE: [PHP] Watermarking of images

2009-05-13 Thread tedd

At 9:49 AM -0400 5/13/09, Robert Cummings wrote:

In the interest of increasing my rightness ratio, I'd just like to point
out that I'm not always right :)


Check the weather channel -- a cold front is being reported in Hell.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-13 Thread Robert Cummings
On Wed, 2009-05-13 at 09:41 -0400, tedd wrote:
> At 4:39 PM -0400 5/12/09, Robert Cummings wrote:
> >On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:
> >
> >  > While your post dealt with [2] mine was addressing [1]. Understand?
> >
> >Except he already had that part working. He wanted to get the outline.
> >You would know that if you read the full post since he gave a link to
> >what he already had using PHP. When he says:
> >
> >  "That site is also coded in php so I'm guessing that the
> >   watermark is added using a php technology."
> >
> >It means that he can presumably also generate a watermark with an
> >outline using PHP and GD.
> 
> Yeah, but that's only true if you read the post in detail. Look, I 
> always skim what the poster said and then answer as I think he may 
> want. Don't brother me with the details.
> 
> That practice has worked for me for years without any problems 
> whatsoever and now you come along and want me to read and understand 
> everything in detail -- that ain't fair. Next thing you'll want is 
> for me to be right all the time like you are.  :-)

In the interest of increasing my rightness ratio, I'd just like to point
out that I'm not always right :)

> >Comprendez vous?
> 
> Didn't they go out of business?

Wasn't that Comprenez Vous?

*tee hee*

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-13 Thread tedd

At 4:39 PM -0400 5/12/09, Robert Cummings wrote:

On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:

 > While your post dealt with [2] mine was addressing [1]. Understand?

Except he already had that part working. He wanted to get the outline.
You would know that if you read the full post since he gave a link to
what he already had using PHP. When he says:

 "That site is also coded in php so I'm guessing that the
  watermark is added using a php technology."

It means that he can presumably also generate a watermark with an
outline using PHP and GD.


Yeah, but that's only true if you read the post in detail. Look, I 
always skim what the poster said and then answer as I think he may 
want. Don't brother me with the details.


That practice has worked for me for years without any problems 
whatsoever and now you come along and want me to read and understand 
everything in detail -- that ain't fair. Next thing you'll want is 
for me to be right all the time like you are.  :-)



Comprendez vous?


Didn't they go out of business?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-12 Thread PJ
Robert Cummings wrote:
> On Tue, 2009-05-12 at 18:53 -0400, PJ wrote:
>   
>> Robert Cummings wrote:
>> 
>>> On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:
>>>   
>>>   
 At 3:48 PM -0400 5/12/09, Robert Cummings wrote:
 
 
> On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:
>   
>   
>>  At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
>>  >  > > Here's an example with code:
>>  >>  >
>>  >  > > http://webbytedd.com/b/watermark/
>>  >>
>>  >>  I can't read the text over the dog's nose... ;)
>>  >
>>  >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
>>  >
>>  >XP. FF 3.0.10 and IE 6.
>>  >
>>  >BOTH do not work.
>>  >
>>  >FF console says "startup is not defined" and "unknown property 'zoom'.
>>  >declaration dropped."
>>
>>  Daevid:
>>
>>  Interesting, try again:
>>
>>  http://webbytedd.com/b/watermark/
>>
>>  It works for me in IE6 and IE7 as well as FF on both XP and Vista.
>>
>>  All I did was to remove the references to empty js and css files.
>> 
>> 
> I think you missed the point of my comment about the black text over the
> dog's black nose. The whole thrust of this thread was to determine how
> to get the black outline around the text. The OP already had text on an
> image and I showed how to get an outline so that regardless of the image
> content the watermark would always be readable.
>
> Cheers,
> Rob.
>   
>   
 Rob:

 I didn't miss it, I just didn't address that part of the post. Please 
 note -- the OP originally asked:

 [1] --- quote
 
 
> That site is also coded in php so I'm guessing that the watermark is 
> added using a php technology.
>
> Can someone enlighten me on how that is done?
>   
>   
 -- unquote

 And:

 [2] --- quote
 
 
> Also, while not php related, could someone enlighten me of a really 
> good font to use for watermarking images?
>   
>   
 -- unquote

 While your post dealt with [2] mine was addressing [1]. Understand?
 
 
>>> Except he already had that part working. He wanted to get the outline.
>>> You would know that if you read the full post since he gave a link to
>>> what he already had using PHP. When he says:
>>>
>>>  "That site is also coded in php so I'm guessing that the
>>>   watermark is added using a php technology."
>>>
>>> It means that he can presumably also generate a watermark with an
>>> outline using PHP and GD.
>>>
>>> Comprendez vous?
>>>   
>>>   
>> That's "comprenez-vous?" Comprends-tu? ;-)
>> 
>
> That's why my kids are in French immersion :)
>
> But moving along... you did "understand" it ;)
>
> Cheers,
> Rob.
>   
To tell the truth, I've been following in a half hearted manner...
I'm a professional photographer and have not needed watermarking up to
now. But I gathered enough to understand what should be done... I see no
problem.
And if I ever stumble, I can always count on the e-mails I have backed
up or on the big hearts of the guys on the list. You're all great. Love
ya! ;-)

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 18:53 -0400, PJ wrote:
> Robert Cummings wrote:
> > On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:
> >   
> >> At 3:48 PM -0400 5/12/09, Robert Cummings wrote:
> >> 
> >>> On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:
> >>>   
>   At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
>   >  > > Here's an example with code:
>   >>  >
>   >  > > http://webbytedd.com/b/watermark/
>   >>
>   >>  I can't read the text over the dog's nose... ;)
>   >
>   >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
>   >
>   >XP. FF 3.0.10 and IE 6.
>   >
>   >BOTH do not work.
>   >
>   >FF console says "startup is not defined" and "unknown property 'zoom'.
>   >declaration dropped."
> 
>   Daevid:
> 
>   Interesting, try again:
> 
>   http://webbytedd.com/b/watermark/
> 
>   It works for me in IE6 and IE7 as well as FF on both XP and Vista.
> 
>   All I did was to remove the references to empty js and css files.
>  
> >>> I think you missed the point of my comment about the black text over the
> >>> dog's black nose. The whole thrust of this thread was to determine how
> >>> to get the black outline around the text. The OP already had text on an
> >>> image and I showed how to get an outline so that regardless of the image
> >>> content the watermark would always be readable.
> >>>
> >>> Cheers,
> >>> Rob.
> >>>   
> >> Rob:
> >>
> >> I didn't miss it, I just didn't address that part of the post. Please 
> >> note -- the OP originally asked:
> >>
> >> [1] --- quote
> >> 
> >>> That site is also coded in php so I'm guessing that the watermark is 
> >>> added using a php technology.
> >>>
> >>> Can someone enlighten me on how that is done?
> >>>   
> >> -- unquote
> >>
> >> And:
> >>
> >> [2] --- quote
> >> 
> >>> Also, while not php related, could someone enlighten me of a really 
> >>> good font to use for watermarking images?
> >>>   
> >> -- unquote
> >>
> >> While your post dealt with [2] mine was addressing [1]. Understand?
> >> 
> >
> > Except he already had that part working. He wanted to get the outline.
> > You would know that if you read the full post since he gave a link to
> > what he already had using PHP. When he says:
> >
> >  "That site is also coded in php so I'm guessing that the
> >   watermark is added using a php technology."
> >
> > It means that he can presumably also generate a watermark with an
> > outline using PHP and GD.
> >
> > Comprendez vous?
> >   
> That's "comprenez-vous?" Comprends-tu? ;-)

That's why my kids are in French immersion :)

But moving along... you did "understand" it ;)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-12 Thread PJ
Robert Cummings wrote:
> On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:
>   
>> At 3:48 PM -0400 5/12/09, Robert Cummings wrote:
>> 
>>> On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:
>>>   
  At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
  >  > > Here's an example with code:
  >>  >
  >  > > http://webbytedd.com/b/watermark/
  >>
  >>  I can't read the text over the dog's nose... ;)
  >
  >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
  >
  >XP. FF 3.0.10 and IE 6.
  >
  >BOTH do not work.
  >
  >FF console says "startup is not defined" and "unknown property 'zoom'.
  >declaration dropped."

  Daevid:

  Interesting, try again:

  http://webbytedd.com/b/watermark/

  It works for me in IE6 and IE7 as well as FF on both XP and Vista.

  All I did was to remove the references to empty js and css files.
 
>>> I think you missed the point of my comment about the black text over the
>>> dog's black nose. The whole thrust of this thread was to determine how
>>> to get the black outline around the text. The OP already had text on an
>>> image and I showed how to get an outline so that regardless of the image
>>> content the watermark would always be readable.
>>>
>>> Cheers,
>>> Rob.
>>>   
>> Rob:
>>
>> I didn't miss it, I just didn't address that part of the post. Please 
>> note -- the OP originally asked:
>>
>> [1] --- quote
>> 
>>> That site is also coded in php so I'm guessing that the watermark is 
>>> added using a php technology.
>>>
>>> Can someone enlighten me on how that is done?
>>>   
>> -- unquote
>>
>> And:
>>
>> [2] --- quote
>> 
>>> Also, while not php related, could someone enlighten me of a really 
>>> good font to use for watermarking images?
>>>   
>> -- unquote
>>
>> While your post dealt with [2] mine was addressing [1]. Understand?
>> 
>
> Except he already had that part working. He wanted to get the outline.
> You would know that if you read the full post since he gave a link to
> what he already had using PHP. When he says:
>
>  "That site is also coded in php so I'm guessing that the
>   watermark is added using a php technology."
>
> It means that he can presumably also generate a watermark with an
> outline using PHP and GD.
>
> Comprendez vous?
>   
That's "comprenez-vous?" Comprends-tu? ;-)
> Cheers,
> Rob.
>   


-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 16:31 -0400, tedd wrote:
> At 3:48 PM -0400 5/12/09, Robert Cummings wrote:
> >On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:
> >>  At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
> >>  >  > > Here's an example with code:
> >>  >>  >
> >>  >  > > http://webbytedd.com/b/watermark/
> >>  >>
> >>  >>  I can't read the text over the dog's nose... ;)
> >>  >
> >>  >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
> >>  >
> >>  >XP. FF 3.0.10 and IE 6.
> >>  >
> >>  >BOTH do not work.
> >>  >
> >>  >FF console says "startup is not defined" and "unknown property 'zoom'.
> >>  >declaration dropped."
> >>
> >>  Daevid:
> >>
> >>  Interesting, try again:
> >>
> >>  http://webbytedd.com/b/watermark/
> >>
> >>  It works for me in IE6 and IE7 as well as FF on both XP and Vista.
> >>
> >>  All I did was to remove the references to empty js and css files.
> >
> >I think you missed the point of my comment about the black text over the
> >dog's black nose. The whole thrust of this thread was to determine how
> >to get the black outline around the text. The OP already had text on an
> >image and I showed how to get an outline so that regardless of the image
> >content the watermark would always be readable.
> >
> >Cheers,
> >Rob.
> 
> Rob:
> 
> I didn't miss it, I just didn't address that part of the post. Please 
> note -- the OP originally asked:
> 
> [1] --- quote
> >That site is also coded in php so I'm guessing that the watermark is 
> >added using a php technology.
> >
> >Can someone enlighten me on how that is done?
> -- unquote
> 
> And:
> 
> [2] --- quote
> >Also, while not php related, could someone enlighten me of a really 
> >good font to use for watermarking images?
> -- unquote
> 
> While your post dealt with [2] mine was addressing [1]. Understand?

Except he already had that part working. He wanted to get the outline.
You would know that if you read the full post since he gave a link to
what he already had using PHP. When he says:

 "That site is also coded in php so I'm guessing that the
  watermark is added using a php technology."

It means that he can presumably also generate a watermark with an
outline using PHP and GD.

Comprendez vous?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-12 Thread tedd

At 3:48 PM -0400 5/12/09, Robert Cummings wrote:

On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:

 At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
 >  > > Here's an example with code:
 >>  >
 >  > > http://webbytedd.com/b/watermark/
 >>
 >>  I can't read the text over the dog's nose... ;)
 >
 >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
 >
 >XP. FF 3.0.10 and IE 6.
 >
 >BOTH do not work.
 >
 >FF console says "startup is not defined" and "unknown property 'zoom'.
 >declaration dropped."

 Daevid:

 Interesting, try again:

 http://webbytedd.com/b/watermark/

 It works for me in IE6 and IE7 as well as FF on both XP and Vista.

 All I did was to remove the references to empty js and css files.


I think you missed the point of my comment about the black text over the
dog's black nose. The whole thrust of this thread was to determine how
to get the black outline around the text. The OP already had text on an
image and I showed how to get an outline so that regardless of the image
content the watermark would always be readable.

Cheers,
Rob.


Rob:

I didn't miss it, I just didn't address that part of the post. Please 
note -- the OP originally asked:


[1] --- quote
That site is also coded in php so I'm guessing that the watermark is 
added using a php technology.


Can someone enlighten me on how that is done?

-- unquote

And:

[2] --- quote
Also, while not php related, could someone enlighten me of a really 
good font to use for watermarking images?

-- unquote

While your post dealt with [2] mine was addressing [1]. Understand?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 09:54 -0400, tedd wrote:
> At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
> >  > > Here's an example with code:
> >>  >
> >  > > http://webbytedd.com/b/watermark/
> >>
> >>  I can't read the text over the dog's nose... ;)
> >
> >You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
> >
> >XP. FF 3.0.10 and IE 6.
> >
> >BOTH do not work.
> >
> >FF console says "startup is not defined" and "unknown property 'zoom'.
> >declaration dropped."
> 
> Daevid:
> 
> Interesting, try again:
> 
> http://webbytedd.com/b/watermark/
> 
> It works for me in IE6 and IE7 as well as FF on both XP and Vista.
> 
> All I did was to remove the references to empty js and css files.

I think you missed the point of my comment about the black text over the
dog's black nose. The whole thrust of this thread was to determine how
to get the black outline around the text. The OP already had text on an
image and I showed how to get an outline so that regardless of the image
content the watermark would always be readable.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-12 Thread Daevid Vincent
yep. works in both now. :) 

> -Original Message-
> From: tedd [mailto:tedd.sperl...@gmail.com] 
> Sent: Tuesday, May 12, 2009 6:55 AM
> To: php-general@lists.php.net; Daevid Vincent
> Subject: RE: [PHP] Watermarking of images
> 
> At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:
> >  > > Here's an example with code:
> >>  >
> >  > > http://webbytedd.com/b/watermark/
> >>
> >>  I can't read the text over the dog's nose... ;)
> >
> >You're lucky. I don't see ANYTHING (as mentioned weeks ago 
> already)...
> >
> >XP. FF 3.0.10 and IE 6.
> >
> >BOTH do not work.
> >
> >FF console says "startup is not defined" and "unknown 
> property 'zoom'.
> >declaration dropped."
> 
> Daevid:
> 
> Interesting, try again:
> 
> http://webbytedd.com/b/watermark/
> 
> It works for me in IE6 and IE7 as well as FF on both XP and Vista.
> 
> All I did was to remove the references to empty js and css files.
> 
> Cheers,
> 
> tedd
> 
> PS: "weeks ago?" I just posted this yesterday.
> 
> -- 
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-12 Thread tedd

At 12:27 PM -0700 5/11/09, Daevid Vincent wrote:

 > > Here's an example with code:

 >

 > > http://webbytedd.com/b/watermark/


 I can't read the text over the dog's nose... ;)


You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...

XP. FF 3.0.10 and IE 6.

BOTH do not work.

FF console says "startup is not defined" and "unknown property 'zoom'.
declaration dropped."


Daevid:

Interesting, try again:

http://webbytedd.com/b/watermark/

It works for me in IE6 and IE7 as well as FF on both XP and Vista.

All I did was to remove the references to empty js and css files.

Cheers,

tedd

PS: "weeks ago?" I just posted this yesterday.

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-11 Thread Ashley Sheridan
On Mon, 2009-05-11 at 12:27 -0700, Daevid Vincent wrote:
> > -Original Message-
> > From: Robert Cummings [mailto:rob...@interjinn.com] 
> > Sent: Monday, May 11, 2009 10:27 AM
> > To: tedd
> > Cc: php-general@lists.php.net; Michael A. Peters
> > Subject: Re: [PHP] Watermarking of images
> > 
> > On Mon, 2009-05-11 at 13:01 -0400, tedd wrote:
> > > At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
> > > >That site is also coded in php so I'm guessing that the 
> > watermark is 
> > > >added using a php technology.
> > > >
> > > >Can someone enlighten me on how that is done?
> > > >
> > > >Also, while not php related, could someone enlighten me of 
> > a really 
> > > >good font to use for watermarking images?
> > > 
> > > 
> > > Michael:
> > > 
> > > Here's an example with code:
> > > 
> > > http://webbytedd.com/b/watermark/
> > 
> > I can't read the text over the dog's nose... ;)
> 
> You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...
> 
> XP. FF 3.0.10 and IE 6. 
> 
> BOTH do not work.
> 
> FF console says "startup is not defined" and "unknown property 'zoom'.
> declaration dropped."
> 
> 
Not sure where the zoom bit comes from (one of your browser plugins
maybe?) but the startup is something which is called from the body
onload attribute, but the script which looks like it would contain that
function (a.js) does not exist.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Watermarking of images

2009-05-11 Thread Daevid Vincent
> -Original Message-
> From: Robert Cummings [mailto:rob...@interjinn.com] 
> Sent: Monday, May 11, 2009 10:27 AM
> To: tedd
> Cc: php-general@lists.php.net; Michael A. Peters
> Subject: Re: [PHP] Watermarking of images
> 
> On Mon, 2009-05-11 at 13:01 -0400, tedd wrote:
> > At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
> > >That site is also coded in php so I'm guessing that the 
> watermark is 
> > >added using a php technology.
> > >
> > >Can someone enlighten me on how that is done?
> > >
> > >Also, while not php related, could someone enlighten me of 
> a really 
> > >good font to use for watermarking images?
> > 
> > 
> > Michael:
> > 
> > Here's an example with code:
> > 
> > http://webbytedd.com/b/watermark/
> 
> I can't read the text over the dog's nose... ;)

You're lucky. I don't see ANYTHING (as mentioned weeks ago already)...

XP. FF 3.0.10 and IE 6. 

BOTH do not work.

FF console says "startup is not defined" and "unknown property 'zoom'.
declaration dropped."


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Robert Cummings
On Mon, 2009-05-11 at 10:39 -0700, Michael A. Peters wrote:
> tedd wrote:
> > At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
> >> That site is also coded in php so I'm guessing that the watermark is 
> >> added using a php technology.
> >>
> >> Can someone enlighten me on how that is done?
> >>
> >> Also, while not php related, could someone enlighten me of a really 
> >> good font to use for watermarking images?
> > 
> > 
> > Michael:
> > 
> > Here's an example with code:
> > 
> > http://webbytedd.com/b/watermark/
> > 
> > Cheers,
> > 
> > tedd
> > 
> 
> This is what I'm doing, it seems to work -
> 
> $im=imagecreatefromjpeg($impath);
> $text_font="LT_51250.TTF";
> imageantialias($im, true);
> $imw=imagesx($im);
> $imy=imagesy($im);
> $string="© " . $somestring;
> $lbox=imageftbbox($fontsize, 0, $text_font, $string);
> $color = imagecolorallocate ($im, 255,255,255);
> $bcolor = imagecolorallocate ($im, 0,0,0);
> 
> imagefttext($im,$fontsize,0,($xcord - 1),$ycord,$bcolor,$text_font,$string);
> 
> imagefttext($im,$fontsize,0,($xcord + 1),$ycord,$bcolor,$text_font,$string);
> 
> imagefttext($im,$fontsize,0,$xcord,($ycord - 1),$bcolor,$text_font,$string);
> 
> imagefttext($im,$fontsize,0,$xcord,($ycord + 1),$bcolor,$text_font,$string);
> 
> imagefttext($im,$fontsize,0,$xcord,$ycord,$color,$text_font,$string);
> 
> header ("Content-type: image/jpeg");
> imagejpeg($im);
> imagedestroy($im);
> 
> where $impath is the filesystem path to where image is stored, $xcord is 
> x coordinate, $ycord is y coordinate.
> 
> It does it very nicely.
> (I changed font to helvetica - it seems to work a little better for this 
> than lucida mono, largely because it isn't monospace).

Note that the 1 pixel offset is optional. You could use 2 or more and
get a thicker black border. It might even be nicer looking if you did
all eight directions.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Michael A. Peters

tedd wrote:

At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
That site is also coded in php so I'm guessing that the watermark is 
added using a php technology.


Can someone enlighten me on how that is done?

Also, while not php related, could someone enlighten me of a really 
good font to use for watermarking images?



Michael:

Here's an example with code:

http://webbytedd.com/b/watermark/

Cheers,

tedd



This is what I'm doing, it seems to work -

$im=imagecreatefromjpeg($impath);
$text_font="LT_51250.TTF";
imageantialias($im, true);
$imw=imagesx($im);
$imy=imagesy($im);
$string="© " . $somestring;
$lbox=imageftbbox($fontsize, 0, $text_font, $string);
$color = imagecolorallocate ($im, 255,255,255);
$bcolor = imagecolorallocate ($im, 0,0,0);

imagefttext($im,$fontsize,0,($xcord - 1),$ycord,$bcolor,$text_font,$string);

imagefttext($im,$fontsize,0,($xcord + 1),$ycord,$bcolor,$text_font,$string);

imagefttext($im,$fontsize,0,$xcord,($ycord - 1),$bcolor,$text_font,$string);

imagefttext($im,$fontsize,0,$xcord,($ycord + 1),$bcolor,$text_font,$string);

imagefttext($im,$fontsize,0,$xcord,$ycord,$color,$text_font,$string);

header ("Content-type: image/jpeg");
imagejpeg($im);
imagedestroy($im);

where $impath is the filesystem path to where image is stored, $xcord is 
x coordinate, $ycord is y coordinate.


It does it very nicely.
(I changed font to helvetica - it seems to work a little better for this 
than lucida mono, largely because it isn't monospace).


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Robert Cummings
On Mon, 2009-05-11 at 13:01 -0400, tedd wrote:
> At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
> >That site is also coded in php so I'm guessing that the watermark is 
> >added using a php technology.
> >
> >Can someone enlighten me on how that is done?
> >
> >Also, while not php related, could someone enlighten me of a really 
> >good font to use for watermarking images?
> 
> 
> Michael:
> 
> Here's an example with code:
> 
> http://webbytedd.com/b/watermark/

I can't read the text over the dog's nose... ;)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread tedd

At 12:04 AM -0700 5/11/09, Michael A. Peters wrote:
That site is also coded in php so I'm guessing that the watermark is 
added using a php technology.


Can someone enlighten me on how that is done?

Also, while not php related, could someone enlighten me of a really 
good font to use for watermarking images?



Michael:

Here's an example with code:

http://webbytedd.com/b/watermark/

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Lenin
I'm talking about  Unicode TTF fonts(OpenType).

The characters Like this   অ আ ক খ

Fonts in  www.omicronlab.com  or www.ekushey.org

Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Robert Cummings
On Mon, 2009-05-11 at 20:06 +0600, Lenin wrote:
> Thanks to Robert and congrats Michael :)
> 
> Robert could you suggest about the transperency or translucency in GD?

Is this what you're looking for?

http://www.php.net/manual/en/image.examples.merged-watermark.php

> I also have interest in using Bangla Font through GD, but I dont know
> why it doesn't support it. if anyone had suggestions ...

What kind of font is it? Your PHP may not have support for true type
fonts.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Lenin
Thanks to Robert and congrats Michael :)

Robert could you suggest about the transperency or translucency in GD?

I also have interest in using Bangla Font through GD, but I dont know
why it doesn't support it. if anyone had suggestions ...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Michael A. Peters

Robert Cummings wrote:



I did something similar to this a long time ago. The trick was to print
the text 5 times. 4 times with black. 1 time with white. The 4 black
prints are done with a 1 pixel offset in each direction of the compass.
This will produce the nice black outline that has the shape of the font
itself and ensures the text can be seen on any background.


The results of the suggestion -

http://www.shastaherps.org/images/9-2.jpg

You can see how that would be a problem w/o the outline with the text in 
lower right hand corner, and see how the outline works wonders.


I'm happy :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Michael A. Peters

Robert Cummings wrote:



I did something similar to this a long time ago. The trick was to print
the text 5 times. 4 times with black. 1 time with white. The 4 black
prints are done with a 1 pixel offset in each direction of the compass.
This will produce the nice black outline that has the shape of the font
itself and ensures the text can be seen on any background.


Thanks!

That worked out perfectly.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Robert Cummings
On Mon, 2009-05-11 at 00:04 -0700, Michael A. Peters wrote:
> I need to know the best way to dynamically watermark images via gd.
> 
> This is an example of what I currently have:
> 
> http://www.shastaherps.org/images/66-3.jpg
> 
> That's using Lucida Mono. A really nice monospace font (very similar to 
> Apple's Monaco), the font I like to use in text editors, but perhaps not 
> the best font for watermarking.
> 
> This is an example of a much better watermark:
> 
> http://www.naherp.com/vouchers/24116-24060.jpg
> 
> I'm not sure what font that is (anyone know ??) but that site looks like 
> it somehow adds a black border around the font, making the watermark 
> much better.
> 
> With mine, on certain backgrounds the watermark has to moved from one 
> corner to another or the color has to be changed in order for it to 
> properly show.
> 
> That site is also coded in php so I'm guessing that the watermark is 
> added using a php technology.
> 
> Can someone enlighten me on how that is done?
> 
> Also, while not php related, could someone enlighten me of a really good 
> font to use for watermarking images?

I did something similar to this a long time ago. The trick was to print
the text 5 times. 4 times with black. 1 time with white. The 4 black
prints are done with a 1 pixel offset in each direction of the compass.
This will produce the nice black outline that has the shape of the font
itself and ensures the text can be seen on any background.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Watermarking of images

2009-05-11 Thread Lenin
I haven't used GD lib yet. But I can suggest one thing, that is
printing a layer of color under the text to be printed could be a
saver.

I dont know how translucency is made but thats another way to make
better WaterMarks as well.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php