Page 1 of 1

Refactoring two

Posted: 2015-06-14T02:50:48-07:00
by sorno
So I have the following code working as expected:
convert -background white -fill black -font Arial -density 600 -pointsize 18 label:name name.jpg
convert -composite -geometry +500+3400 -flatten "file.tif" name.jpg -flatten -resample 300 -colorspace sRGB -strip -interlace none -gaussian-blur 0.05 "new.jpg"

But I have tried 100 ways to combine these both together so that I don't have to produce the name.jpg like:

convert ^( -background white -fill black -font Arial -density 600 -pointsize 18 label:name mpr:name ^) -composite -compose Over -geometry +500+3400 -flatten "file.tif" mpr:label -colorspace sRGB -resample 300 -strip -interlace none -gaussian-blur 0.05 "new.jpg"

Here i lose the label completely.

Any ideas....help much appreciated
Windows
6.9.1-4

Re: Refactoring two

Posted: 2015-06-14T03:33:31-07:00
by snibgo

Code: Select all

convert -composite -geometry +500+3400 -flatten "file.tif" name.jpg -flatten -resample 300 -colorspace sRGB -strip -interlace none -gaussian-blur 0.05 "new.jpg"
First, get the order of the options correct. Read the inputs, do the operations, write the output.

Then merging the commands should be easier.