Page 1 of 1
[SOLVED] mostly- scripting display -loop 0 infinite
Posted: 2016-06-13T04:56:12-07:00
by geoland
Hi. I want to keep looping files until the display window is closed - space bar forward and backspace backward, ad-infinitum.
Edits follow...
Presently, the loop completes 3 times and closes.
Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-06-01
Should I be using animate instead?
Code: Select all
files=*.ppm
for i in $files; do
display -delay 0 -loop 0 -coalesce -normalize -gamma 3 -resize 1024x768 *.ppm
done
fi
Re: sripting display -loop 0 infinite
Posted: 2016-06-13T06:39:57-07:00
by magick
Use `animate` to loop indefinitely.
Re: scripting display -loop 0 infinite
Posted: 2016-06-14T03:54:40-07:00
by geoland
The problem with using animate is that frames cannot be deleted. In that File Delete is not available.
animate on my version of IM does not accept -contrast or -normalize which I need to display what are otherwise near linear images.
I imagine this is a bash scripting question - closing the display window or selecting File Quit in the window. That's the ideal behaviour for the application.
[SOLVED] mostly- Re: scripting display -loop 0 infinite
Posted: 2016-06-15T01:30:25-07:00
by geoland
This was the best I could come up with. Suggestions for improvement? Perhaps better mogrify contrast settings. -normalize does a different thing in display and animate and I would like the animation and editing windows to look the same.
Code: Select all
#!/bin/bash
#ifs.sh
# A blink script
# testing only
# rm -f *.txt
# rm -f processlist
# generate half size preview - change raw extension to suit
dcraw -o 0 -w -H 2 -h *.CR2
previews=$(ls *.ppm)
mogrify="mogrify $previews -auto-gamma -normalize"
animate="animate -delay 50 -loop 0 -resize 800x600 -page 800x600 $previews"
display="display -resize 800x600 -page 800x600 $previews"
$mogrify | $animate | $display
# control animation from window menu or space / backspace and note low quality previews
# delete previews in display window with Ctrl D or from display menu - space / backspace
# create a process list to convert retained image files later - without deleting source files
IFS=:
list=$(ls *.ppm)
echo $list > processlist
# create separate files from processlist - if required?
awk 'BEGIN { FS = ":" } ; { print > $0".txt" }' processlist
# delete previews
rm -f *.ppm
killall blink1
exit