Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Calling ImageMagick on Windows...

 [1/12] from: carl:cybercraft at: 15-Jul-2007 22:08


Hi all, I've installed ImageMagick on Windows and it's working fine from the Command Prompt, but I just get errors when trying to call it from REBOL/View. This is the Command Prompt I'm trying to duplicate... convert c:\pic.jpg c:\pic.png and this is what I'm doing in REBOL... call/output/error ["convert" %/c/pic.jpg] %/c/pic.png %err.txt but it doesn't work, returning an "Invalid drive specification" error. (I get an "Invalid Parameter" error if I use paths with spaces in.) So, can anyone see what I'm doing wrong? -- Carl Read.

 [2/12] from: compkarori:gm:ail at: 15-Jul-2007 22:19


Try changing rebol paths to windows paths format. On 7/15/07, Carl Read <carl-cybercraft.co.nz> wrote:
> Hi all, > I've installed ImageMagick on Windows and it's working fine from the Command Prompt, but I just get errors when trying to call it from REBOL/View. This is the Command Prompt I'm trying to duplicate...
<<quoted lines omitted: 7>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [3/12] from: compkarori:g:mail at: 15-Jul-2007 22:20


ie. call "convert c:\pic.jpg c:\pic.png" On 7/15/07, Carl Read <carl-cybercraft.co.nz> wrote:
> Hi all, > I've installed ImageMagick on Windows and it's working fine from the Command Prompt, but I just get errors when trying to call it from REBOL/View. This is the Command Prompt I'm trying to duplicate...
<<quoted lines omitted: 7>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [4/12] from: carl::cybercraft::co::nz at: 15-Jul-2007 22:48


On Sunday, 15-July-2007 at 22:20:57 Graham Chiu wrote,
>ie. call "convert c:\pic.jpg c:\pic.png"
Just tried that (and probably had a few times before:) - but it doesn't work, giving a "Invalid Parameter - c:\pic.png" error. I've tried every variation of Windows' file formats and REBOL file formats that I can think of - and none have worked. The call I gave seemed to be what REBOL's docs suggested should work, but no go. -- Carl Read.

 [5/12] from: anton:wilddsl:au at: 16-Jul-2007 1:10


What is the command line that definitely works in the DOS console ? Anton.

 [6/12] from: anton::wilddsl::net::au at: 16-Jul-2007 1:17


You shouldn't need to use any refinements of CALL to get it to work the first time. You probably don't want to be using /output, since Convert probably isn't usually printing the contents of the result png image into stdout (which would flood the DOS console). So a single string is what you want to send to CALL. Regards, Anton.

 [7/12] from: gregg::pointillistic::com at: 15-Jul-2007 13:26


Hi Carl,
>>ie. call "convert c:\pic.jpg c:\pic.png"
Have you tried fully qualifying all the filenames, including the app itself? Here's what I use to build the call string in one case: reform [ img-conversion-app '-size size * 2 to-local-file file '-thumbnail size any [extra-cmd ""] to-local-file dest-file ] img-conversion-app and the filenames, in my case, are fully qualified. --Gregg

 [8/12] from: carl:cybercraft at: 16-Jul-2007 8:26


On Monday, 16-July-2007 at 1:10:57 Anton Rolls wrote,
>What is the command line that definitely >works in the DOS console ?
convert c:\pic.jpg c:\pic.png

 [9/12] from: compkarori::gmail::com at: 16-Jul-2007 8:33


I'm sure I tried this before in Rebol and it worked fine. However, I switched to using comlib and use imagemagick that way. On 7/16/07, Carl Read <carl-cybercraft.co.nz> wrote:
> On Monday, 16-July-2007 at 1:10:57 Anton Rolls wrote, > >
<<quoted lines omitted: 17>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [10/12] from: carl:cybercraft at: 16-Jul-2007 18:17


Ahah - yes, that does work! And for the record... call {"c:\program files\ImageMagick-6.3.5-Q16\convert.exe" c:\pic.jpg c:\pic.png} And I'd tried something similar to begin with, but I guess I had the paths wrong somehow, so switched to trying to get it to work how they say in the manual. You'll note the app's not called ImageMagick though. This is a suite of about 16 programs. Anyway, thanks Gregg - you put me on the right track. -- Carl Read. On Sunday, 15-July-2007 at 13:26:28 Gregg Irwin wrote,

 [11/12] from: anton:wilddsl:au at: 16-Jul-2007 16:25


That makes sense. What directory does the shell opened by rebol think it's in ?
>> call/console "cd"
D:\Anton\Dev\Rebol\View == 0 Maybe convert.exe is not to be found in that directory. Anton.

 [12/12] from: carl::cybercraft::co::nz at: 16-Jul-2007 18:50


On Monday, 16-July-2007 at 16:25:13 Anton Rolls wrote,
>That makes sense. What directory does the shell opened by >rebol think it's in ? > >>> call/console "cd" >D:\Anton\Dev\Rebol\View >== 0 > >Maybe convert.exe is not to be found in that directory.
Nope...
>> call/console "CD"
c:\program files\rebol\view I didn't know it needed to be, since I'm in "c:\Documents and Settings\..." when using Windows' Command Prompt, and it works. The REBOL docs for Call could do with more real-world examples - though I can understand why they're not there... -- Carl Read.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted