Code: Select all
convert.exe: unable to open image `(reference.jpg': No such file or directory @ error/blob.c/OpenBlob/2638.
Code: Select all
convert.exe: unable to open image `(reference.jpg': No such file or directory @ error/blob.c/OpenBlob/2638.
Code: Select all
<delegate command="dcraw.exe -6 -w -O "%u.ppm" "%i"" stealth="True" decode="dng:decode"/>
To
<delegate command="dcraw.exe -4 -w -O "%u.ppm" "%i"" stealth="True" decode="dng:decode"/>
Code: Select all
convert mainky.jpg ^
( reference.jpg -gravity center -crop "50x60+0+0" ^
-scale "1x1^!" -negate ^
-set colorspace RGB ^
-colorspace HSL -channel Lightness -evaluate set 50%% -colorspace RGB ^
-set colorspace sRGB ^
-scale "400x300^!" ^
) ^
-compose overlay -composite ^
main_fixed4.jpg
Code: Select all
FOR /F "tokens=1,2" %%i IN ('%IM%identify -format "%%w %%h" %1') DO (
set WIDTH=%%i
set HEIGHT=%%j
)
This is the size (width and height) of the image. You can get these dimensions by inserting this earlier in the script:rcolba wrote:Can I also get this running somehow without giving the file size 400x300 ?
Code: Select all
FOR /F "tokens=1,2" %%i IN ('%IM%identify -format "%%w %%h" %1') DO (
set WIDTH=%%i
set HEIGHT=%%j
)
Code: Select all
@echo off
if [%1]==[] goto :eof
:loop
FOR /F "tokens=1,2" %%i IN ('%IM%identify -format "%%w %%h" %1') DO (
set WIDTH=%%i
set HEIGHT=%%j
)
convert %1 ^
( wbref.jpg -gravity center -crop "50x50+0+0" ^
-scale "1x1^!" -negate ^
-set colorspace RGB ^
-colorspace HSL -channel Lightness -evaluate set 50%% -colorspace RGB ^
-set colorspace sRGB ^
-scale "%WIDTH%x%HEIGHT%^!" ^
) ^
-compose overlay -composite ^
%~n1_wb.jpg
shift
if not [%1]==[] goto loop