Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: command line image viewer

  1. #1
    Join Date
    Jan 2010
    Location
    England
    Beans
    185
    Distro
    Ubuntu

    command line image viewer

    i would like to load images from a script. the script involves loading the image, changing the original image then reload it. i have tried some of the image viewers only to find they dont work in this way.

    Code:
    #!/bin/bash
    
    code to load image
    code to change image
    code to reload image
    what be the quickest, most efficient way of doing this? (without having to close then re-open a window everytime.)

    spiritech
    Last edited by spiritech; March 25th, 2013 at 04:58 AM.
    Keep those cups of Ubuntu comming.
    Ubuntu 12.10

  2. #2
    Join Date
    Oct 2007
    Beans
    1,756

    Re: command line image viewer

    How about imagemagick and then feh?

  3. #3
    Join Date
    Jan 2010
    Location
    England
    Beans
    185
    Distro
    Ubuntu

    Re: command line image viewer

    i have tried feh. only problem is that i want to reload the image to the current window, not re-open a new window everytime i reload the image. also i would have to close the current image before running anything else in the script.
    Last edited by spiritech; March 25th, 2013 at 04:24 AM.
    Keep those cups of Ubuntu comming.
    Ubuntu 12.10

  4. #4
    Join Date
    Feb 2008
    Beans
    722

    Re: command line image viewer

    Try xnview mp "batch" commands, otherwise you probably need someone with programming skills.

  5. #5
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: command line image viewer

    Quote Originally Posted by spiritech View Post
    i would like to load images from a script. the script involves loading the image, changing the original image then reload it. i have tried some of the image viewers only to find they dont work in this way.

    Code:
    #!/bin/bash
    
    code to load image
    code to change image
    code to reload image
    what be the quickest, most efficient way of doing this? (without having to close then re-open a window everytime.)

    spiritech
    hit
    did "mogrify" will solve your problem ? --> the original image file is overwritten with any changes you request so can use it in a batch script.
    comes with ImageMagick
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  6. #6
    Join Date
    Apr 2006
    Location
    Ubuntuland
    Beans
    2,124
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: command line image viewer

    There is NO command line tool that will do that. That's not how COMMAND LINE tools work in the first place. If you want to continuously view and edit images, that's what GUI programs like GIMP are for.
    24 beers in a case, 24 hours in a day. Coincidence? I think not!

    Trusty Tahr 64 bit, AMD Phenom II 955 Quad Core 3.2GHz, GeForce 9600 GT
    16G PC2-6400 RAM, 128 GB SSD, Twin 1TB SATA 7200 RPM RAID0

  7. #7
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,803

    Re: command line image viewer

    Quote Originally Posted by Slim Odds View Post
    There is NO command line tool that will do that. That's not how COMMAND LINE tools work in the first place. If you want to continuously view and edit images, that's what GUI programs like GIMP are for.
    You mean like GIMP batch mode which is command line and not gui ?

    To the OP try GIMP batch mode http://www.gimp.org/tutorials/Basic_Batch/

    There are also plenty of ways to do this via command line but depends on your level of comfort with command line, and also you need to be more specific such as changes you want to make, here are some examples:

    http://playingwithsid.blogspot.co.uk...ash-shell.html
    https://jcornuz.wordpress.com/2007/1...h-batch-power/
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  8. #8
    Join Date
    Apr 2006
    Location
    Ubuntuland
    Beans
    2,124
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: command line image viewer

    Maybe I misunderstood the "requirements", but if it's just a need for command line progressing then ImageMagick is the best.
    24 beers in a case, 24 hours in a day. Coincidence? I think not!

    Trusty Tahr 64 bit, AMD Phenom II 955 Quad Core 3.2GHz, GeForce 9600 GT
    16G PC2-6400 RAM, 128 GB SSD, Twin 1TB SATA 7200 RPM RAID0

  9. #9
    Join Date
    Jan 2010
    Location
    England
    Beans
    185
    Distro
    Ubuntu

    Re: command line image viewer

    maybe i will have a look at an image viewer source code and see whats going on in there. i am sure it cant be that hard.

    i have also found a workaround to this problem when looking at PQIV. it has the function to monitor a file for changes and, i assume, update the image when the changes occur. does anyone know any other image viewers with this function?
    Last edited by spiritech; March 26th, 2013 at 06:59 AM. Reason: grammar
    Keep those cups of Ubuntu comming.
    Ubuntu 12.10

  10. #10
    Join Date
    Jan 2010
    Location
    England
    Beans
    185
    Distro
    Ubuntu

    Re: command line image viewer

    i have looked further into this and have some new information on this matter. i have found out that with the command

    Code:
    eog image.png &
    i can pass the proccess to the background and return to bash. so am half way there. now all i need to find out is how to reload the image to the current window and not a new one. i will read through the help and man pages of some of the image viewers and see if any of them have this option.

    or maybe i can do this just with bash, something like.

    Code:
    eog image.png & > current window
    maybe.

    if not thankyou all for your help so far.
    Last edited by spiritech; March 26th, 2013 at 07:25 AM.
    Keep those cups of Ubuntu comming.
    Ubuntu 12.10

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •