comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » bug in cgHasImageMagic
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
bug in cgHasImageMagic [message #89515] Wed, 22 October 2014 16:15 Go to next message
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
Hi David (FYI, the rest of the group),

I found a bug in cgHasImageMagic. It's very simple, I could fix myself, but you may want to update the program.
It has to do with UNC paths:

IDL> cd, 'c:'
IDL> print, cgHasImageMagick(VERSION=VERSION)
1
IDL> print, version
6.8.9-7
IDL> cd, '\\wron\working\'
IDL> print, cgHasImageMagick(VERSION=VERSION)
0

the problem in cgHasImageMagic is that SPAWN does return an error, but it doesn't mean that ImageMagic is not installed:

IDL> Spawn, 'convert -version', result, error_result
IDL> print, error_result
'\\wron\working' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
IDL> print, result
Version: ImageMagick 6.8.9-7 Q16 x64 2014-08-16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib


cheers

JP
Re: bug in cgHasImageMagic [message #89516 is a reply to message #89515] Wed, 22 October 2014 16:26 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JP writes:

> I found a bug in cgHasImageMagic. It's very simple, I could fix myself, but you may want to update the program.
> It has to do with UNC paths:
>
> IDL> cd, 'c:'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 1
> IDL> print, version
> 6.8.9-7
> IDL> cd, '\\wron\working\'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 0
>
> the problem in cgHasImageMagic is that SPAWN does return an error, but it doesn't mean that ImageMagic is not installed:
>
> IDL> Spawn, 'convert -version', result, error_result
> IDL> print, error_result
> '\\wron\working' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
> IDL> print, result
> Version: ImageMagick 6.8.9-7 Q16 x64 2014-08-16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP
> Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib

OK, what is your fix? :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: bug in cgHasImageMagic [message #89517 is a reply to message #89515] Wed, 22 October 2014 16:26 Go to previous messageGo to next message
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
actually, it may be a good thing after all, because when using SPAWN in windows, paths cannot be UNC, so an error will still show up either when reading or writing a postcript or any other file...
But the error message could be a little different I think, tell the user that the path to the file/s cannot be UNC.

JP




On Thursday, 23 October 2014 10:15:24 UTC+11, JP wrote:
> Hi David (FYI, the rest of the group),
>
> I found a bug in cgHasImageMagic. It's very simple, I could fix myself, but you may want to update the program.
> It has to do with UNC paths:
>
> IDL> cd, 'c:'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 1
> IDL> print, version
> 6.8.9-7
> IDL> cd, '\\wron\working\'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 0
>
> the problem in cgHasImageMagic is that SPAWN does return an error, but it doesn't mean that ImageMagic is not installed:
>
> IDL> Spawn, 'convert -version', result, error_result
> IDL> print, error_result
> '\\wron\working' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
> IDL> print, result
> Version: ImageMagick 6.8.9-7 Q16 x64 2014-08-16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP
> Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
>
>
> cheers
>
> JP
Re: bug in cgHasImageMagic [message #89518 is a reply to message #89516] Wed, 22 October 2014 16:28 Go to previous messageGo to next message
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
well, I lied :)
I didn't fix the program, I simply mapped the network drive and my path is not \\wron\working anymore but z:\

JP



On Thursday, 23 October 2014 10:26:18 UTC+11, David Fanning wrote:
> JP writes:
>
>> I found a bug in cgHasImageMagic. It's very simple, I could fix myself, but you may want to update the program.
>> It has to do with UNC paths:
>>
>> IDL> cd, 'c:'
>> IDL> print, cgHasImageMagick(VERSION=VERSION)
>> 1
>> IDL> print, version
>> 6.8.9-7
>> IDL> cd, '\\wron\working\'
>> IDL> print, cgHasImageMagick(VERSION=VERSION)
>> 0
>>
>> the problem in cgHasImageMagic is that SPAWN does return an error, but it doesn't mean that ImageMagic is not installed:
>>
>> IDL> Spawn, 'convert -version', result, error_result
>> IDL> print, error_result
>> '\\wron\working' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
>> IDL> print, result
>> Version: ImageMagick 6.8.9-7 Q16 x64 2014-08-16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP
>> Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
>
> OK, what is your fix? :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: bug in cgHasImageMagic [message #89521 is a reply to message #89515] Wed, 22 October 2014 16:33 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JP writes:

>
> Hi David (FYI, the rest of the group),
>
> I found a bug in cgHasImageMagic. It's very simple, I could fix myself, but you may want to update the program.
> It has to do with UNC paths:
>
> IDL> cd, 'c:'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 1
> IDL> print, version
> 6.8.9-7
> IDL> cd, '\\wron\working\'
> IDL> print, cgHasImageMagick(VERSION=VERSION)
> 0
>
> the problem in cgHasImageMagic is that SPAWN does return an error, but it doesn't mean that ImageMagic is not installed:
>
> IDL> Spawn, 'convert -version', result, error_result
> IDL> print, error_result
> '\\wron\working' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
> IDL> print, result
> Version: ImageMagick 6.8.9-7 Q16 x64 2014-08-16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP
> Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib

I suppose my fix would be to change the name of the program to
cgImageMagickFound. Should have thought of that before. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plotting Seasons
Next Topic: Read several files into one big data array?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:13:14 PDT 2025

Total time taken to generate the page: 0.00511 seconds