I'm using following script in a Windows world where I installed ImageMagick-6.8.9-Q16; users choose a picture that is send to Org-jpg-logo-IN
Then a logo is printed on it depending on the size of the original picture.
I was asked if I could print the name of the photgrapher on the picture. (example "John Doe Be Firm")
For some reason I only get "John"
Can somebody show me my error..
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
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
set /a dimension=width*hight
echo file %file% >> %converted%\percent.txt
echo width %width% >> %converted%\percent.txt
echo hight %hight% >> %converted%\percent.txt
echo author %author% >> %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
::"C:\Program Files\ImageMagick-6.8.9-Q16\convert.exe" "%logo%" -resize %percent% "%converted%\%logo%"
"C:\Program Files\ImageMagick-6.8.9-Q16\convert.exe" "%logo%" -resize %percent%x%percent% %converted%\logo-tmp.png
::"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\composite.exe" "%converted%logo-tmp.png" "%file%" -dissolve 95 -gravity SouthEast "%converted%\95%filename%"
"C:\Program Files\ImageMagick-6.8.9-Q16\composite.exe" "%converted%logo-tmp.png" "%file%" -dissolve 75 -gravity SouthEast "%converted%\75%filename%"
"C:\Program Files\ImageMagick-6.8.9-Q16\composite.exe" "%converted%logo-tmp.png" "%file%" -dissolve 55 -gravity SouthEast "%converted%\55%filename%"
del "%originale%%filename%"
del "%converted%\logo-tmp.png"