Wondering if anyone could help with running Fred's autotone script under cygwin.
Followed instructions, and keep getting an error of "unable to open pixel cache".
The session looks like this:
dncap@dncapStation /cygdrive/d/temp/ortos/cygwinteste
$ autotone Product97.tif Product97_v2.tif
convert.exe: unable to open pixel cache `./AUTOTONE.4444/tmpRGB.mpc': No such file or directory @ error/cache.c/OpenPixelCache/3711.
convert.exe: unable to persist pixel cache `./AUTOTONE.4444/tmpRGB.mpc' @ error/mpc.c/ReadMPCImage/944.
convert.exe: no images defined `./AUTOTONE.4444/tmpT.mpc' @ error/convert.c/ConvertImageCommand/3230.
I tried debugging by adding "set -x" at the top of the script. This gave me all the commands the script uses.
The error occurs on this command:
$ convert './AUTOTONE.9396/tmpRGB.mpc[0]' ./AUTOTONE.9396/tmpM.mpc -compose multiply -composite ./AUTOTONE.9396/tmpT.mpc
It complains that tmpRGB.mpc does not exist...
The previous command works and is like this:
$ convert ./AUTOTONE.9396/tmpRGB.mpc ./AUTOTONE.9396/tmpM.mpc -compose multiply -composite ./AUTOTONE.9396/tmpT.mpc
So my reasoning is that this command does something to tmpRGB.mpc that will error out in the following command.
At the bottom I'm pasting the output of the script with all commands sequence and error message.
Hoping someone can help.
Cheers,
Duarte
Code: Select all
$ autotone Product151.tif Product151_v2.tif
+ resize=
+ bright=yes
+ gray=yes
+ white=yes
+ gamma=yes
+ noise=yes
+ sharpen=yes
+ progress=false
+ percent=1
+ gammamid=0.425
+ skythresh=80
+ skyheight=25
+ maskthresh=0.125
+ repeats=
+ gain=0.75
+ feedback=1
+ whitenorm=none
+ graynorm=none
+ dir=.
++ type /cygdrive/d/temp/ortos/cygwinteste/autotone
++ awk '{print $3}'
+ PROGNAME=/cygdrive/d/temp/ortos/cygwinteste/autotone
++ dirname /cygdrive/d/temp/ortos/cygwinteste/autotone
+ PROGDIR=/cygdrive/d/temp/ortos/cygwinteste
++ basename /cygdrive/d/temp/ortos/cygwinteste/autotone
+ PROGNAME=autotone
+ '[' 2 -eq 0 ']'
+ '[' 2 -gt 25 ']'
+ '[' 2 -gt 0 ']'
+ case "$1" in
+ break
+ infile=Product151.tif
+ outfile=Product151_v2.tif
+ '[' Product151.tif = '' ']'
+ '[' Product151_v2.tif = '' ']'
+ tmpdir=.
+ dir=./AUTOTONE.8608
+ mkdir ./AUTOTONE.8608
+ trap 'rm -rf ./AUTOTONE.8608;' 0
+ trap 'rm -rf ./AUTOTONE.8608; exit 1' 1 2 3 15
+ trap 'rm -rf ./AUTOTONE.8608; exit 1' ERR
+ '[' '' '!=' '' ']'
+ resizing=
+ convert -quiet Product151.tif +repage ./AUTOTONE.8608/tmpI.mpc
++ convert ./AUTOTONE.8608/tmpI.mpc -format '%[fx:max(w,h)]' info:
+ dim=10000
+ '[' 10000 -gt 1000 ']'
+ reducing='-resize 25%'
++ convert -list configure
++ sed '/^LIB_VERSION_NUMBER /!d; s//,/; s/,/,0/g; s/,0*\([0-9][0-9]\)/\1/g'
++ head -n 1
+ im_version=06090107
+ '[' 06090107 -lt 06070607 -o 06090107 -gt 06070707 ']'
+ setcspace='-set colorspace RGB'
+ '[' 06090107 -lt 06070607 ']'
+ cspace=sRGB
+ '[' 06090107 -gt 06080504 ']'
+ setcspace=
+ cspace=sRGB
+ '[' 06090107 -lt 06060100 ']'
+ process=-color-matrix
+ '[' yes = yes ']'
+ false
+ '[' 06090107 -lt 06050501 ']'
+ convert ./AUTOTONE.8608/tmpI.mpc -auto-level ./AUTOTONE.8608/tmpI.mpc
+ '[' yes = yes ']'
+ false
+ convert ./AUTOTONE.8608/tmpI.mpc -resize 25% -channel RGB -separate ./AUTOTONE.8608/tmpRGB.mpc
+ convert ./AUTOTONE.8608/tmpI.mpc -resize 25% '(' -clone 0 -colorspace HSB -channel G -negate -separate +channel ')' '(' -clone 0 -colorspace HSB -channel B -separate +channel -solarize 50% -level 0x50% ')' '(' -clone 1 -clone 2 -compose multiply -composite ')' '(' -clone 3 -contrast-stretch 0,1% -fill black +opaque white ')' -delete 0-3 ./AUTOTONE.8608/tmpM.mpc
+ getMean ./AUTOTONE.8608/tmpM.mpc
+ img=./AUTOTONE.8608/tmpM.mpc
+ '[' 06090107 -ge 06030901 ']'
++ convert ./AUTOTONE.8608/tmpM.mpc -format '%[mean]' info:
+ mean=655.476
++ convert xc: -format '%[fx:655.476/quantumrange]' info:
+ mean=0.0100019
+ maskmean=0.0100019
+ convert ./AUTOTONE.8608/tmpRGB.mpc ./AUTOTONE.8608/tmpM.mpc -compose multiply -composite ./AUTOTONE.8608/tmpT.mpc
+ convert './AUTOTONE.8608/tmpRGB.mpc[0]' ./AUTOTONE.8608/tmpM.mpc -compose multiply -composite ./AUTOTONE.8608/tmpT.mpc
convert.exe: unable to open pixel cache `./AUTOTONE.8608/tmpRGB.mpc': No such file or directory @ error/cache.c/OpenPixelCache/3711.
convert.exe: unable to persist pixel cache `./AUTOTONE.8608/tmpRGB.mpc' @ error/mpc.c/ReadMPCImage/944.
convert.exe: no images defined `./AUTOTONE.8608/tmpT.mpc' @ error/convert.c/ConvertImageCommand/3230.
++ rm -rf ./AUTOTONE.8608
++ exit 1
+ rm -rf ./AUTOTONE.8608