1
mwstratton
Watermarking Images with myGallery-P using ImageMagick
  • 2005/7/25 5:10

  • mwstratton

  • Just popping in

  • Posts: 5

  • Since: 2005/7/19


I was curious if anyone has successfully done this. I asked how to do it on the myGallery-P forums over at his site, and he gave me instructions, however they did not seem to work for me. I simply want to have imagemagick add a color watermark with 0% transparency in the bottom-right corner.

First I tried editing his instructions, and did not have any success. Then I tried to get it to work at all by following his instruction exactly and still had no luck of anything compositing over the original image. I double checked everything, and tried it multiple times but have yet to have any success. If anyone can help me with this, I'd greatly appreciate it.

here's a copy/paste from what he said to do in his forums in case it helps.

---BEGIN PASTE---
edit line 405 of include/functions.php
-End of function myalbum_modify_photo_by_imagick()-

---BEGIN CODE---

// Do Modify and check success
if( $option != "" ) exec( "{$myalbum_imagickpath}convert $option $src_path $dst_path" ) ;

if( ! is_readable( $dst_path ) ) {
// didn't exec convert, rename it.
@rename( $src_path , $dst_path ) ;
$ret = 2 ;
} else {
@unlink( $src_path ) ;
$ret = 1 ;
}

// water mark
$wmfile = dirname( dirname( __FILE__ ) ) . '/images/watermark.gif' ;
if( file_exists( $wmfile ) ) {
exec( "{$myalbum_imagickpath}composite -compose plus $wmfile $dst_path $dst_path" ) ;
}

return $ret ;
}

---END CODE---

And you have to make watermark.gif and put it modules/myalbum/images/

watermark.gif
-index color
-background is black (#000000)
-draw "copyright" etc. 80% grey.

That's all.

---END PASTE---
Thanks!

Wes

2
mwstratton
Re: Watermarking Images with myGallery-P using ImageMagick
  • 2005/8/1 7:58

  • mwstratton

  • Just popping in

  • Posts: 5

  • Since: 2005/7/19


*bump* hate to do this but is there anyone that can help me with this? it's the last thing I need to figure out before my site is fully up and running.

I just don't want to 'open' it to people and have images being uploadloaded that I have to edit and insert the watermark myself.

Thanks!

Wes

Login

Who's Online

253 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 253


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits