hello dear opensuse-fans
how to view photos and to rapidly change the major categories
i have several hundred images (photographs) taht i want to view on opensuse linux version 13.1
i want to view the images - and of while doing so i want to turn the colored images into b/w
Question; 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.5
so 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:
for i in *jpg ; do mogrify -colorspace Gray "$i" ; done
this is just a quick hack. i haven’t tried it. also, it’s not interactive and simply changes all jpg’s to grayscale, even if they already are grayscale.
btw we need more information about imagemagick.
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>
what can i do!?
man convert
offers
convert input-image -greyscale method [output-image]
hello dear john
many thanks
should i run this code in the folder of the images?
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> convert input-image -greyscale method [output-image]
convert: unable to open image `input-image': Datei oder Verzeichnis nicht gefunden @ error/blob.c/OpenBlob/2643.
convert: no decode delegate for this image format `input-image' @ error/constitute.c/ReadImage/552.
convert: unrecognized option `-greyscale' @ error/convert.c/ConvertImageCommand/1675.
i think i have to re-order the code line?
On 09/14/2014 09:06 PM, dilbertone wrote:
>
> hello dear opensuse-fans
>
>
> how to view photos and to rapidly change the major categories
>
> i have several hundred images (photographs) taht i want to view on
> opensuse linux version 13.1
>
>
> i want to view the images - and of while doing so i want to turn the
> colored images into b/w
>
> Question; 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.5
>
>
> so 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 haven’t tried it. also, it’s not
> interactive and simply changes all jpg’s to grayscale, even if they
> already are grayscale.
> btw we need more information about imagemagick.
>
>
> see the results:
>
>
> Code:
> --------------------
> 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>
>
> --------------------
>
>
> what can i do!?
>
>
You’ll have to run the script inside the folder, or you can add some
lines to give you some options, and if you place the file in the Bin
folder (in your home), you can access it in a terminal…or make a
application link.
make a chmod a+x to the file
read -p “Enter the image folder to convert: > " -i “$HOME/” -e c
path=”$c"
for i in “$c”/*jpg ; do mogrify -colorspace Gray “$i” ; done
this is a rough example…
–
openSuSe 13.1
Yes, you should run your for-loop inside the directory where your jpg resides. I also suggest to use *.jpg so you are sure that your code is for files ending in .jpg. If there are several hundreds pictures then find might be faster, if speed matters in your case.
find /PATH/TO/DIRECTORY -name '*.jpg' -execdir 'YOUR MOGRIFY CODE HERE' {} +
That does not require you to be inside the directory where your jpg files are when you run that code. The only thing you need to replace in that code is the /PATH/TO/DIRECTORY which is the directory where your jpg files are and ‘YOUR MOGRIFY CODE HERE’ which is the code to convert your jpg files, the rest is as is.