I want to annotate copyright symbol with windows bat

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
Forssux
Posts: 3
Joined: 2014-05-07T04:24:07-07:00
Authentication code: 6789

I want to annotate copyright symbol with windows bat

Post by Forssux »

Hi There

Thanks to this forum I've assembled a script with snips of scripts left and right.
I'm using ImageMagick-6.8.9-Q16 in a Windows 7 environment.

The script produce 3 pictures one with a Logo, one with text and one with both.
The problem is that the intended "©" becomes a "®" on the picture.

I have read here: But I just can't seem to find it...
Does anybody can help me?

Kind Regards
Guy

Code: Select all

::@echo on
set originale=D:\Org-jpg-logo-IN\
set converted=\\dgcmdc002\dalet\To-JPGHIRES-Logo\
set logo=C:\Program Files\ImageMagick-6.8.9-Q16\logo-full.png
set programpath=C:\Program Files\ImageMagick-6.8.9-Q16\
for %%f in (%originale%*.jpg) do call :process %%~nxf
goto :eof
:process
SET filename=%1 %2 %3 %4 %5 %6
Set file=%originale%%filename%
FOR /F %%x IN ('identify -ping -format "%%w" "%file%"') DO SET width=%%x
FOR /F %%x IN ('identify -ping -format "%%h" "%file%"') DO SET hight=%%x
::For /F %%x IN ('identify -format "\n%%[EXIF:copyright]" "%file%"') DO SET Author="Author"+%%x
FOR /F "tokens=*" %%x IN ('identify -format "\n%%[EXIF:Artist]" "%file%"') DO SET Artist=%%x
set /a dimension=width*hight
echo file %file% >> %converted%\percent.txt
echo width %width% >> %converted%\percent.txt
echo hight %hight% >> %converted%\percent.txt
echo artist %artist% >> %converted%\percent.txt
set /a widthpercent=(width/7)
set /a hightpercent=(hight/7)
if %widthpercent% GTR %hightpercent% set /a percent=widthpercent 
if %hightpercent% GEQ %widthpercent% set /a percent=hightpercent
echo widthpercent %widthpercent% >> %converted%\percent.txt
echo hightpercent %hightpercent% >> %converted%\percent.txt
echo percent %percent% >> %converted%\percent.txt
echo %1 >> %converted%\percent.txt
echo %2 >> %converted%\percent.txt
echo %3 >> %converted%\percent.txt
echo %4 >> %converted%\percent.txt
echo %5 >> %converted%\percent.txt

::"C:\Program Files\ImageMagick-6.8.9-Q16\convert.exe" "%logo%" -resize %percent%x%percent% logo-tmp.png
::"C:\Program Files\ImageMagick-6.8.9-Q16\convert.exe" "%logo%" -resize %percent% "%converted%\%logo%"
"%programpath%convert.exe" "%logo%" -resize %percent%x%percent% %converted%\logo-tmp.png
::"%programpath%composite.exe" "%converted%logo-tmp.png" "%file%" -dissolve 55 -gravity SouthEast "%converted%\%filename%"
"%programpath%composite.exe" "%converted%logo-tmp.png" "%file%" -dissolve 55 -gravity SouthEast "%converted%\%1-55.jpg"
"%programpath%convert.exe" "%file%" -pointsize 100 -fill black -gravity southwest -annotate +0+0 "U+000A9%Artist%" ^
::										-fill white -gravity southwest -annotate +10+10 "©%Artist%"  "%converted%\Wat2%filename%"
::"%programpath%convert.exe" "%file%" -pointsize 100 -fill black -gravity southwest -annotate +0+0 " BE Defence DGCCOM %Artist%" ^
::										-fill white -gravity southwest -annotate +10+10 "  DGCCOM %Artist%"  "%converted%\Wat3%filename%"

del "%originale%%filename%"
del "%converted%\logo-tmp.png"
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: I want to annotate copyright symbol with windows bat

Post by snibgo »

I would do it as a UTF-8 character. See my page on UTF-8 characters (with Windows).
snibgo's IM pages: im.snibgo.com
Post Reply