[SOLVED]6.8.3+Win7 x86-issues with "convert wizard.jpg win:"

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Locked
ghorg
Posts: 7
Joined: 2011-04-28T07:05:10-07:00
Authentication code: 8675308

[SOLVED]6.8.3+Win7 x86-issues with "convert wizard.jpg win:"

Post by ghorg »

I am using the Windows precompiled binary ImageMagick-6.8.3-9-Q16-x86-dll.exe on Windows 7 Professional x86.

Code: Select all

>convert -version
Version: ImageMagick 6.8.3-8 2013-03-04 Q16 http://www.imagemagick.org
opyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
eatures: DPC OpenMP
elegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x xml zlib
I am experiencing an similar issue as reported here
When I run the test commands "convert wizard: wizard.jpg && convert wizard.jpg win:" after installation I see the Windows "Open With" dialog instead of the image.

I installed this version of ImageMagick as follows:
  1. Uninstalled the previous version of ImageMagick
  2. Ran the new installer as Administrator
  3. Used the default settings during the installation.
The installation was successful, and I am presented with the final instructions:
You have now installed ImageMagick. To test the installation select Command Prompt from the Windows Start menu. Within the window type:

convert wizard: wizard.jpg
convert wizard.jpg win:


and the ImageMagick wizard displays in a window.
When I run the second command the Windows "Open With" dialog appears and says
Choose the program you want to use to open this file:

File: magick-4628kezn5-8WBfJU
(The temporary file name changes each time I run the command, natch)

If I am quick enough, I can select "Windows Photo Viewer" and view the image before the command "times out" (?)

Is there a way for ImageMagick to let Windows know that the temporary file name is an image?
I tried modifying the "delegates.xml" file to add a delegate for jpg (copied and pasted the delegate for png) but this did not appear to work.

Code: Select all

<delegate decode="jpg" encode="win" spawn="True" mode="encode" command="cmd.exe /C start "%m" file:///"%i."" />
Last edited by ghorg on 2013-03-15T14:03:52-07:00, edited 1 time in total.

User avatar
whugemann
Posts: 313
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: IM 6.8.3 + Win7 x86 - issues with "convert wizard.jpg wi

Post by whugemann »

Basically, the 'win:' pseudo output format is superfluous in Windows. It would suffice just to type 'wizard.jpg' into the cmd box (or the Windows Run box) and Windows would start the associated application and load the image. So this instruction is only confusing for Windows users and the non-functionality of it is no real problem.

What IM does when you use 'win:' is that it creates a temporary BMP file with no extension and tries to open it in the Photo Viewer, an application that is no longer present on most modern Windows computers.

Anyway, you would have to change the BMP line in the delegates.xml file into something like:

Code: Select all

 <delegate decode="bmp" encode="win" mode="encode" command="cmd /C %i" />
However, although %i is a BMP file (as can be checked via changing command="cmd /C identify %i"), it lacks an extension and thus the associated application cannot be identified. One could try something like

Code: Select all

 <delegate decode="bmp" encode="win" mode="encode" command="cmd /C %%ProgramFiles%%/irfanview/i_view32 %i" />
as IrfanView is probably installed on all Windows computers that have ImageMagick installed. This does however not function, as IrfanView also does not know what image format it is dealing with and there is no command line parameter that could provide the hint.

Summing it up: Forget about 'win:'.
Wolfgang Hugemann

ghorg
Posts: 7
Joined: 2011-04-28T07:05:10-07:00
Authentication code: 8675308

Re: IM 6.8.3 + Win7 x86 - issues with "convert wizard.jpg wi

Post by ghorg »

whugemann wrote:Basically, the 'win:' pseudo output format is superfluous in Windows. It would suffice just to type 'wizard.jpg' into the cmd box (or the Windows Run box) and Windows would start the associated application and load the image. So this instruction is only confusing for Windows users and the non-functionality of it is no real problem.

<...>

Summing it up: Forget about 'win:'.
OK. Thank you for the explanation.

Locked