Warren Vick
Warren Vick

Reputation: 81

ImageMagick escape character?

Is there an escape character I can use to pick up a copyright symbol in an ImageMagick convert command label directive?

I'm trying to mark a batch of images with a credit/copyright in the bottom-right corner. The batch is being handled by CMD script running in a Windows command line window. The problem I have is that the copyright symbol changes into a registered trademark symbol! I know it's a code page issue of going through the command window, so I'd hoped that ImageMagick could handle \Uxxxx or similar, but no joy.

Upvotes: 2

Views: 1093

Answers (2)

emcconville
emcconville

Reputation: 24439

For windows command prompt (cmd), use the ^ symbol.

convert.exe label:^©copy example.png

imagemagick escape character

For power shell, this is ` symbol.

convert.exe label:`©copy example.png

Note: For inserting the copyright symbol, I had to hold alt and type 0169 on the numberpad

Upvotes: 3

Warren Vick
Warren Vick

Reputation: 81

A colleague found an answer involving temporarily changing code pages:

chcp 1252
set "c=©"
chcp 850
for %%f in (*.png) do convert -background "#FFFFFF" -font verdana -fill black label:" %c% 2015 My Company" miff:- | composite -gravity SouthEast -geometry +0+0 - "%%f" "credited\%%f.png"

Upvotes: 2

Related Questions