Alternative to ztext for 64 bit 2.2 and up?

AfterShot Pro Plugins
rileyrg
Posts: 9
Joined: Sat Nov 07, 2015 8:17 pm
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
Location: Hamburg

Alternative to ztext for 64 bit 2.2 and up?

Post by rileyrg »

I'm looking to watermark some photos. Suggestions on the best way?
Hobgoblin
Posts: 259
Joined: Fri Jan 13, 2012 3:00 am
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
Location: UK

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by Hobgoblin »

rileyrg wrote:I'm looking to watermark some photos. Suggestions on the best way?
Go back to AfterShot Pro 2.1.2.10 :cry:
rileyrg
Posts: 9
Joined: Sat Nov 07, 2015 8:17 pm
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
Location: Hamburg

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by rileyrg »

I'm kind of getting the impression that this is a bit of a dead in the water development :( Thanks for the advice. I think I'll return to Gimp.
Dutchmm
Posts: 297
Joined: Sun Feb 05, 2012 8:55 am
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
motherboard: Asus 97
processor: Intel i7 4785T
ram: 16GB
Video Card: Onboard Intel
sound_card: Intel AC97
Hard_Drive_Capacity: 2.5TB
Monitor/Display Make & Model: Philips 28"
Corel programs: ASP 3 Pro (and 2 and 1 before)

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by Dutchmm »

As you are on Linux, you can probably do everything zText gave you with imageMagick. You probably already know that it's possible to incorporate a script into output batches, so you can embed values in the metadata and pick them up in the imageMagick code you apply to your conversions. Feel free to PM me if you want help in exploring this (I only used it to print numbers on photos I was sending to my print processor).
hannes_hab
Posts: 300
Joined: Sat Jan 14, 2012 4:49 am
operating_system: Linux
System_Drive: Z
32bit or 64bit: 64 Bit
motherboard: ASUSTeK P8H77-I
processor: Intel Core i7 3770K 3.5 GHz x 8
ram: 16 GB
Video Card: AMD Radeon R7 200 Series
sound_card: Radeon HD 7700 7800 Sapphire
Hard_Drive_Capacity: 2x250GbSSD
Monitor/Display Make & Model: LG IPS 21:9 UltraWide 34UM95-P 3440x1440
Corel programs: AfterShotPro 1, 2, (3)
Location: Austria

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by hannes_hab »

Though hoping that zText, zFrame, zSoften (and others) will be available for ASP 2.2 + I also would be interested to have an alternative method to do what is done with these plugins.
Thank you Dutchmm for the hint with imageMagick and the output batches.
Would be nice to have more information on how to do this with ImageMagic.
regards Hannes
austria

Nikon D7000 + D70, Nikon P6000, Nikon P330 (use P7800) PanasonicTZ100, Vuescan
bibble 4, bibble 5, ASP mostly on Ubuntu 14.04 ( sometimes Suse Linux 11.4 or WIN10)
Dutchmm
Posts: 297
Joined: Sun Feb 05, 2012 8:55 am
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
motherboard: Asus 97
processor: Intel i7 4785T
ram: 16GB
Video Card: Onboard Intel
sound_card: Intel AC97
Hard_Drive_Capacity: 2.5TB
Monitor/Display Make & Model: Philips 28"
Corel programs: ASP 3 Pro (and 2 and 1 before)

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by Dutchmm »

Hi Hannes
Sorry for the delay in responding - I should put the plugins forum on RSS, I suppose.

Here is my - not very good - watermarking script to overprint the "DSCxxxxx" name component on all the files in the current directory:

#!/bin/bash
for x in `find . -name \*.jpg`;
do
y=`echo $x | sed -e "s:\.\/::g"` # Extract the left hand end of the filename, because
w=`echo $y | sed -e "s:\.jpg::g"` # we shall need it for the watermark text
z=`identify $y | cut -f3 -d " "` # Get the dimensions for this picture
#
#
# Now we have the text to print on the picture (w) and its dimensions (z)
# we can make a transparent picture of the correct size
#
convert -background transparent -fill black -gravity South -size "${z}" label:$w $w.png
#
# Daft loop to ensure we shan't continue until linux has finished writing the transparent picture
#
goon=`lsof -t $w.png`
while [ -n "${goon}" ]
do
wait 10
goon=`lsof -t $w.png`
done
#
# Now the transparency is ready, we can lay it on top of the original
#

composite -compose DstOver -gravity South $y $w.png $w.png
wait 100
w2=`echo $w`p.jpg
#
# My printing service doesn't want pictures at more than 250dpi for prints under 20cm by 30
# So resize and write to a JPG with a relevant but non-destructive filename.
#
convert -units PixelsPerInch $w.png -density 250 $w2
done

Andreas' book (section 9.2) gives some guidance on how to use ImageMagick directly in a custom batch file, in brief using "%1" as the token with which ASP will connect each image to the single ImageMagick command to run. Where you need to script something more complex, the shell script will receive
the output from ASP as $1.

I hope this is some help.
hannes_hab
Posts: 300
Joined: Sat Jan 14, 2012 4:49 am
operating_system: Linux
System_Drive: Z
32bit or 64bit: 64 Bit
motherboard: ASUSTeK P8H77-I
processor: Intel Core i7 3770K 3.5 GHz x 8
ram: 16 GB
Video Card: AMD Radeon R7 200 Series
sound_card: Radeon HD 7700 7800 Sapphire
Hard_Drive_Capacity: 2x250GbSSD
Monitor/Display Make & Model: LG IPS 21:9 UltraWide 34UM95-P 3440x1440
Corel programs: AfterShotPro 1, 2, (3)
Location: Austria

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by hannes_hab »

thank you - tried it - and its working (only get the message: "Zeile 27: wait: Prozess 100 wurde nicht von dieser Shell gestartet.").

I found out how to change color of the text, but not how to change position, size, font ...

Thank you for the Hint with Andreas ASG - I have the book but did not notice the pages concerning ImageMagick.
regards Hannes
austria

Nikon D7000 + D70, Nikon P6000, Nikon P330 (use P7800) PanasonicTZ100, Vuescan
bibble 4, bibble 5, ASP mostly on Ubuntu 14.04 ( sometimes Suse Linux 11.4 or WIN10)
tintin
Posts: 169
Joined: Thu Jan 12, 2012 2:45 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Ryzen R5 3600X

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by tintin »

hi,

just for your information. I'm currently about to build all the zPlugins for the latest ASP versions.
i will send them very soon to Corel for testing and putting on the plugin page.

br
tintin
my plugins on the official plugins homepage
If you find my plugins helpful, please make a donation to support further developments - just click here, thank you!
hannes_hab
Posts: 300
Joined: Sat Jan 14, 2012 4:49 am
operating_system: Linux
System_Drive: Z
32bit or 64bit: 64 Bit
motherboard: ASUSTeK P8H77-I
processor: Intel Core i7 3770K 3.5 GHz x 8
ram: 16 GB
Video Card: AMD Radeon R7 200 Series
sound_card: Radeon HD 7700 7800 Sapphire
Hard_Drive_Capacity: 2x250GbSSD
Monitor/Display Make & Model: LG IPS 21:9 UltraWide 34UM95-P 3440x1440
Corel programs: AfterShotPro 1, 2, (3)
Location: Austria

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by hannes_hab »

Thank you for the good news!
regards Hannes
austria

Nikon D7000 + D70, Nikon P6000, Nikon P330 (use P7800) PanasonicTZ100, Vuescan
bibble 4, bibble 5, ASP mostly on Ubuntu 14.04 ( sometimes Suse Linux 11.4 or WIN10)
twan052
Posts: 20
Joined: Fri Jan 13, 2012 4:53 pm
operating_system: Mac
System_Drive: N/A
32bit or 64bit: 64 Bit
motherboard: Gigabyte GA-z87x-udh3
processor: Intel Core I7
ram: 8GB
Video Card: Intel HD4600
Hard_Drive_Capacity: 3TB
Monitor/Display Make & Model: Dell-u2713h
Corel programs: Aftershot Pro

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by twan052 »

tintin wrote:hi,

just for your information. I'm currently about to build all the zPlugins for the latest ASP versions.
i will send them very soon to Corel for testing and putting on the plugin page.

br
tintin
Good news makes ASP 2.2 again a little useful for me.
Still use ASP 2.1.10 due to lack of supported plugins
and several bugs first introduced in update versions 2.2.xxx

Thanks in advance,

Twan
timolavi
Posts: 1
Joined: Tue Mar 08, 2016 12:17 pm
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit

Re: Alternative to ztext for 64 bit 2.2 and up?

Post by timolavi »

Hi

I have found Dutchmm's script usefull and made some development in it.
- It removes temporal png-files
- it resizes final jpg-files to horizontal size 749 as default, but size can be changed by first parameter.
- In the second parameter you can give directory and present directory is default.
- it is now case insensitive in file names
- it puts given text as "watermark" at SouthEast corner with font size proportional to horizontal width of the image. Proportion is now 1/30. (c=`expr $b / 30`)
- font must be changed to some installed one, those installed ones can be listed by "convert -list font"
- there is some debugging output of variables

#!/bin/bash

if [[ "$2" != "" ]]; then
directory="$2"
else
directory=.
fi

echo 'directory is '$directory
def_size=749
size=${1:-$def_size}
echo 'size is ' $size
cd $directory

for x in `find . -iname \*.jpg`;
do
y=`echo $x | sed -e "s:\.\/::g"` # Extract the left hand end of the filename, because
w=`echo $y | sed -e "s:\.jpg::gI"` # we shall need it for the watermark text
z=`identify $y | cut -f3 -d " "` # Get the dimensions for this picture
a=`expr index $z x`
b=`echo $z|awk -F'x' '{print $1}'`
c=`expr $b / 30`
echo $x $y $w $z $a $b $c
#
#
# Now we have the text to print on the picture (w) and its dimensions (z)
# we can make a transparent picture of the correct size
#
convert -background transparent -fill dodgerblue -strokewidth 3 -stroke none -gravity SouthEast -size "${z}" -font Comic-Sans-MS -pointsize $c label:"\@Some text" $w.png
#
#
# Now the transparency is ready, we can lay it on top of the original
#

composite -compose DstOver -gravity South $y $w.png $w.png

w2=`echo $w`Copy.jpg
#echo $w2
#
#
convert -units PixelsPerInch $w.png -resize $size'x' $w2
rm *.png
done

timolavi