Refactoring two

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sorno
Posts: 3
Joined: 2015-06-11T20:15:07-07:00
Authentication code: 6789

Refactoring two

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Refactoring two

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply