| View previous topic :: View next topic |
| Author |
Message |
afx Bibble Expert
.gif)
Joined: 21 Jul 2005 Posts: 3981 Location: Munich
|
Posted: Thu Mar 09, 2006 11:21 pm Post subject: |
|
|
Hmm,
I am wondering how hard it would be to do that in a plugin? Probably not that sensible, but a plugin that is an interface to ImageMagick sounds like someting useful.
cherrs
afx _________________ sRGB clipping sucks |
|
| Back to top |
|
 |
bibble Site Admin
.gif)
Joined: 30 Mar 2002 Posts: 6834 Location: Austin, Tx
|
Posted: Thu Mar 09, 2006 11:34 pm Post subject: |
|
|
Adding a watermark via a plugin would be painfully simple.
Eric |
|
| Back to top |
|
 |
Henry Goh
Joined: 01 Mar 2006 Posts: 24 Location: Singapore
|
Posted: Fri Mar 10, 2006 4:39 am Post subject: If you shoot events or weddings |
|
|
| and have to quickly process 800 to 1000 images for proof to show clients, that watermarking step within conversion is a big time saver. Hope this can be incorporated. |
|
| Back to top |
|
 |
Khaytsus
Joined: 17 Mar 2005 Posts: 202
|
Posted: Fri Mar 10, 2006 4:46 am Post subject: |
|
|
Henry, if you're on *nix it should be easy, let me know if you have any problems. _________________ Fedora 11 64 bit
NVidia 8600 GTS (190.40, dual monitor - (2960x1050), Intel X9650 (4 Core 3Ghz), 8G ram, Lexmark S905 Printer
http://unlimitedphoto.com |
|
| Back to top |
|
 |
Khaytsus
Joined: 17 Mar 2005 Posts: 202
|
Posted: Fri Mar 10, 2006 4:49 am Post subject: |
|
|
By the way, I meant to put up a sample, so here is one..
 _________________ Fedora 11 64 bit
NVidia 8600 GTS (190.40, dual monitor - (2960x1050), Intel X9650 (4 Core 3Ghz), 8G ram, Lexmark S905 Printer
http://unlimitedphoto.com |
|
| Back to top |
|
 |
TonyKInTexas
Joined: 14 Oct 2004 Posts: 271
|
Posted: Sat Mar 11, 2006 3:55 am Post subject: |
|
|
Now if we could convert the Bash script to PHP 4, which I have on my Windows system, I could join the fun.  |
|
| Back to top |
|
 |
Khaytsus
Joined: 17 Mar 2005 Posts: 202
|
Posted: Sat Mar 11, 2006 6:34 am Post subject: |
|
|
Well, you might be able to convert it to a batch file, there is ImageMagick for Windows and I expect the arguments would be the same for the commands.. Just guessing here, but you might look into it.
PHP and GD might be able to do it, but no idea.  _________________ Fedora 11 64 bit
NVidia 8600 GTS (190.40, dual monitor - (2960x1050), Intel X9650 (4 Core 3Ghz), 8G ram, Lexmark S905 Printer
http://unlimitedphoto.com |
|
| Back to top |
|
 |
TonyKInTexas
Joined: 14 Oct 2004 Posts: 271
|
Posted: Sat Mar 11, 2006 8:52 am Post subject: |
|
|
| a CMD file could not do the math required to get proprotions and sizes of the image. |
|
| Back to top |
|
 |
Stefano
Joined: 01 Jan 2006 Posts: 26 Location: Lowell, MI
|
Posted: Sat Mar 11, 2006 9:38 am Post subject: Watermarking Script |
|
|
Just tried the script that was posted here under Windows with cygwin - works flawlessly
To install cygwin, and bring some Unix goodness to windows, see www.cygwin.com _________________ Stefano Lassini
www.stefanolightworks.com
Canon EOS 5D and EOS 20D
Linux (suse 10.3) - Bibble Pro - MAC OS X 10.5.2 |
|
| Back to top |
|
 |
TonyKInTexas
Joined: 14 Oct 2004 Posts: 271
|
Posted: Sat Mar 11, 2006 10:45 am Post subject: |
|
|
| THANKS@ |
|
| Back to top |
|
 |
Henry Goh
Joined: 01 Mar 2006 Posts: 24 Location: Singapore
|
Posted: Sat Mar 11, 2006 8:41 pm Post subject: Scripts - please help! |
|
|
| I'm clueless what to do with the posted script. I really would love to watermark my proofs. Any help for a Win2K dummy? Thanks. |
|
| Back to top |
|
 |
TonyKInTexas
Joined: 14 Oct 2004 Posts: 271
|
Posted: Sun Mar 12, 2006 3:42 am Post subject: |
|
|
Save the script as a .sh file.
Get and install ImageMagick.
Get and install Cygwin.
For Windows you need to associate the .sh file with Cygwin so the script can be executed.
In Bibble you need to associate the script with a queue (I believe).
You should then be pretty well set. I've not done all of this yet, but these are the basics for doing this sort of thing. |
|
| Back to top |
|
 |
Khaytsus
Joined: 17 Mar 2005 Posts: 202
|
Posted: Sun Mar 12, 2006 7:40 am Post subject: |
|
|
How long does cygwin take to load up? Maybe someone could rewrite the script in PHP, would that be a better solution in Windows?
I could do the PHP myself easy enough, just curious if that would be helpful.. Or Perl.. etc.. _________________ Fedora 11 64 bit
NVidia 8600 GTS (190.40, dual monitor - (2960x1050), Intel X9650 (4 Core 3Ghz), 8G ram, Lexmark S905 Printer
http://unlimitedphoto.com |
|
| Back to top |
|
 |
Henry Goh
Joined: 01 Mar 2006 Posts: 24 Location: Singapore
|
Posted: Sun Mar 12, 2006 7:43 am Post subject: Thanks all |
|
|
but looks like scripting is beyond simple ME so I will just have to sit here until someone smart comes up with a plug-in for the job.
Thank again.
Henry |
|
| Back to top |
|
 |
andreas

Joined: 15 May 2002 Posts: 280 Location: Wermelskirchen - Germany
|
Posted: Sun Mar 12, 2006 8:52 am Post subject: |
|
|
I run into trouble with the above script. Some annotations appear rotated. So I checked it and did the following change in the annotation-geometries:
code all geoms like this:
I did some further changes in positioning and an undercolor-box for the text. Now here is my actual version of the watermark script:
| Code: |
#!/bin/bash
# Text that's laid out down the middle of the image about every third.
spantext="Copyright"
# Text in the bottom-right corner of the image
copytext="Copyright Andreas Schrell\nhttp://fotos.schrell.de"
# Amount that the text is lightened when composited onto the image.
disolve=40
### Don't think you need to edit below here unless you want to tweak.
# Determine the size of the input image..
sizetmp=`identify $1 | cut -f 3 -d " "`
sizex=`echo $sizetmp | cut -f 1 -d x`
sizey=`echo $sizetmp | cut -f 2 -d x`
# Calculate the size of the fonts based on image size
fontsize=`expr $sizey / 30`
fontsizesm=`expr $sizey / 42`
# Offset that the top and bottom 'span' text is away from the edges
annospanx=`expr $sizex / 5`
annospany=`expr $sizey / 5`
# Offset that the copyright text is from the edges.
annocopyrightx=`expr $sizex / 50`
annocopyrighty=`expr $sizey / 50`
# Create the 'temporary' image for the watermark.
convert -size ${sizex}x${sizey} -pointsize $fontsize -font Helvetica xc:none -fill black \
-undercolor gray \
-gravity NorthWest -annotate "0x0+${annospanx}+${annospany}" "$spantext" \
-gravity East -annotate "0x0+${annospanx}+0" "$spantext" \
-gravity SouthWest -annotate "0x0+${annospanx}+${annospany}" "$spantext" \
-gravity SouthEast -pointsize $fontsizesm \
-annotate "0x0+${annocopyrightx}+${annocopyrighty}" "$copytext" \
miff:- |\
# Do the watermarking of the image, output to itself so the file written from
# Bibble is the one that is watermarked.
composite -dissolve $disolve - $1 $1
|
Andreas |
|
| Back to top |
|
 |
|