Maze Posted September 14, 2014 Share Posted September 14, 2014 hello dear php-experts and freakshow to view photos and to rapidly change the major categoriesi have several hundred images (photographs) taht i want to view on opensuse linux version 13.1i want to view the images - and of while doing so i want to turn the colored images into b/wQuestion; which is the best - ie. the quickest way to do so.note; i have installed the following thigns on my opensuse 13.1:- gimp the great grahical tool- digicam - the great tool to view images and pictures- Gwenview Version 4.11.4 on KDE 4.11.5so again here the question: which tool allowes to view the color(ed) image and to turn it - on the fly - in to black and white?BTW: can i tell linux to swith the colors - in general - to black and white? is this doable...looks like we could write a small shell script, utilizing imagemagick.maybe like this:Code: for i in *jpg ; do mogrify -colorspace Gray "$i" ; done this is just a quick hack. i have tried. See more bleow: Also, it's not interactive and simply changes all jpg's to grayscale, even if they already are grayscale.please note that we need to have some more things about imagemagick. well see the results: martin@linux-70ce:~/Bilder> martin@linux-70ce:~/Bilder> for i in *jpg ; do mogrify -colorspace Gray "$i" ; done mogrify: unable to open image `*jpg': Datei oder Verzeichnis nicht gefunden @ error/blob.c/OpenBlob/2643. mogrify: no decode delegate for this image format `*jpg' @ error/constitute.c/ReadImage/552. martin@linux-70ce:~/Bilder> Quote Link to comment https://forums.phpfreaks.com/topic/291064-shell-script-utilizing-imagemagick-as-a-stack-programme-to-turn-images-into-greyscale/ Share on other sites More sharing options...
jazzman1 Posted September 14, 2014 Share Posted September 14, 2014 Most likely the name of this image contains an empty space. Try to wrap the image's name with curly braces. for i in *jpg; do mogrify -colorspace Gray "${i}" done; Quote Link to comment https://forums.phpfreaks.com/topic/291064-shell-script-utilizing-imagemagick-as-a-stack-programme-to-turn-images-into-greyscale/#findComment-1491121 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.