>On Sun, 20 Dec 2009 19:53:41 -0800, Fred Weinhaus wrote: > >> . . . > > convert letterA_shade120x45.png -transparent "rgb(180,180,180)" > > letterA_shade120x45t.png >> . . . >> > > composite -watermark 20 letterA_shade120x45t.png lena.jpg > > lena_letterA_120x45t_watermark.png >> . . . > >Thanks a lot, Fred. Your step by step images are very helpful. > >Some further questions, > >How do you know the grey colour is "rgb(180,180,180)"; is the '-shade' >always generate such colour? > >For the last step, if possible, please show me how to put the watermark >at the lower right corner, ie, where and how to put > > -gravity SouthEast -geometry XxY > >Thanks
the graylevel 180 is dependent on the -shade parameters, in particular the second or altitude angle. So you have to measure it. This can be done fairly easily by getting the top left corner pixel value from that image. val=`convert letterA_shade120x45.png[1x1+0+0] -format "%[fx:round(255*u.g)]" info:` convert letterA_shade120x45.png -transparent "rgb($val,$val,$val)" letterA_shade120x45t.png composite -watermark 20 -gravity southeast -geometry +X+Y southeast letterA_shade120x45t.png lena.jpg lena_letterA_120x45t_watermark.png where +X+Y will offset from the lower right corner Fred _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
