Display image from command line

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
djd
Posts: 41
Joined: 2011-11-12T22:20:18-07:00
Authentication code: 8675308

Display image from command line

Post by djd »

There is a way for the final result of a convert to be displayed by Windows XP.
I discovered this by accident some time ago and have forgotten. Various searches
on the ImageMagick sites do not reveal the method.

a) How is it done?
b) Why is it so difficult to find?


Regards
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Display image from command line

Post by anthony »

I don't know about windows but if the "display" command works then you can use the "show:" delegate

Code: Select all

  convert  logo:  -resize 100x100 show:
I use this all the time but I don't know if it works for windows. :-(
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
djd
Posts: 41
Joined: 2011-11-12T22:20:18-07:00
Authentication code: 8675308

Re: Display image from command line

Post by djd »

convert image.gif show:
Attempts to work but results in the message:

Error loading ..... photoviewer.dll

It seems photoviewer is a WIndows 7 dll not supported by XP.

Unfortunately, I have only just upgraded IM to the most recent version in order to give
Fred's autocaption script the best chance of working (which it does), but the most recent
version looks for photoviewer.

Is there a way to change from photoviewer.dll to something else?

For example, imdisplay image.gif works, but not from a convert command line.

PS: I remember the what I used to use `win:', as expected it evokes the same response as `show:'


Regards
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Display image from command line

Post by fmw42 »

I am not a windows user, so take my comments with caution. You need Windows with cygwin to run any of my scripts such as autocaption. You cannot use show: directly from any of my scripts, you would need to create a Miff:- standard output and pipe that to show or win:?

autocaption args input miff:- | convert - show:

I believe the above works on unix. With Cygwin, I am not sure if you can use show: or win:


show: is I believe for unix/mac and not windows.

Under windows you can use
im_display yourimage

Or possibly

convert yourimage win:

im_display and display are separate commands from convert. you cannot use win: or show with im_display or display.


see
http://www.imagemagick.org/Usage/files/#show
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Display image from command line

Post by el_supremo »

FYI. I tried "convert logo: -resize 50% show:" on Win7 x64 command line and it shows the resulting image with Windows Photo Viewer.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Display image from command line

Post by fmw42 »

thanks, pete, good to know that.

fred
Post Reply