I have to compare lots of images (gif format) manually to each other. In order to do that I do the following steps:

  1. I open one image with the ubuntu image viewer
  2. I semi maximize the window to one side of the screen
  3. I do the same thing with the image I want to compare it to only putting it on the other side of the screen, of course

Since I need to do this for a lot of images I am wondering if there is an easier way to do this. Maybe another program?

The images I am comparing are located in different folders but have the same name. The folders contain multiple images, so it would be great to have the opportunity to select the next image from both folders.

Do you have any ideas how I could do this?

  • Well, I could automate opening image viewer and placing them left and right, like ./snap-images.sh /path/to/img1.gif /path/to/img2.gif It's relatively simple. What's your requirements though ? Also, can you clarify this part: would be great to have the opportunity to select the next image from both folders. How exactly do you want this behavior to be ? – Sergiy Kolodyazhnyy Jan 9 '17 at 12:07
  • Well, this is the tricky part I guess. If I open one image with the image viewer there is a button to show the next image in the folder. I would like that for both images from the different folders the next image is automatically shown if I click the button once. – Ole Jan 9 '17 at 12:39
  • Hi Ole, are the images, to be compared, similar by definition? – Jacob Vlijm Jan 9 '17 at 12:46
  • I don't know if I understand you correctly. The pictures show the same plots (for quality assurance of experimental data) filled always with slightly different information, of course. So I think the answer is yes. – Ole Jan 9 '17 at 12:50
  • "The images I am comparing are located in different folders but have the same name" I bet it could scan ALL of them and put them all side by side under each other ;-) – Rinzwind Jan 9 '17 at 12:50

You could build your script from this one:


if [ $# -ne 2 ]
 zenity --info --text="Usage: $0 file1 file2"  2> /dev/null

feh -g 950x800+5+30 "$1" & pid1=$!
feh -g 950x800+963+30 "$2" & pid2=$!

# using xterm as a workaround to raise zenity to the top (so that is is not behind the feh windows)
#xterm -geometry 40x3-0-0 -e zenity --title="Done?" --info --text="OK or Enter when done"; 2> /dev/null 

xterm -title "${0##*/}" -geometry 70x4+750+880 -e bash -c "read -p 'Press Enter when done'"

kill $pid1 $pid2

Add an outer loop that will guide you through the pairs of images that you want to compare. And of course, you can modify the geometry of the feh windows to match your image files and monitor resolution (this was made for a 1920x1080 monitor). And you can modify and move the control window (the xterm window).

| improve this answer | |
  • Thank you very much for this answer! I have added an outer loop and adjusted the window size to my screen. I am having trouble now only with zenity, because it appears always in the center of my screen and is blocking the view. Can I adjust the geometry of the notification box in some way similar to the xterm? edit: another option would be to request user input in the current terminal but than I have the problem that the terminal is not on top anymore. Would there be another workaround to fix this? – Ole Jan 9 '17 at 14:58
  • What desktop environment are you using? I am testing in LXDE (of Lubuntu), but I might be able to check in Unity of standard Ubuntu or whatever you are using (if an Ubuntu flavour). If you use some exotic desktop environment, I think you should fix the position and focus of the control window yourself. - Anyway, I selected a simple xterm, positioned below the feh windows, and it works in my desktop environment. (See the edited answer.) – sudodus Jan 9 '17 at 17:05
  • I am using the standard unity. But now with your edited answer it works perfect for me. This is exactly what I wanted :) Thanks again! – Ole Jan 10 '17 at 8:45
  • You are welcome, I'm glad it works for you :-) – sudodus Jan 10 '17 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.