Page 1 of 1

how to find and set read image file path

Posted: 2009-10-19T16:35:43-07:00
by harleypig
I'm using PerlMagick, but I suspect this is a general ImageMagick question.

How do I find out what path is searched for an image read command? I can't seem to find it anywhere in the documentation. I'm fairly sure that '.' (the current directory) is being searched, but I need to be able to set a path (or preferably, a number of paths) that can be searched for an image name to be accessed.

Re: how to find and set read image file path

Posted: 2009-10-19T22:17:44-07:00
by anthony
For image reading their is no path. You must tell IM what file to read, either relative to the current directory, or relative to the root of the machine (starts with '/' under linux/mac. or 'C:\' (or other drive letter) under windows.

You can specify wild card characters though, like '*' and '?', but then IM reads and searches the directories specified to find the file. See
http://www.imagemagick.org/Usage/files/#read

Other ways of finding a specific file include the 'find' and 'locate' command under UNIX and LINUX, though I am sure you can download and install similar commands under windows (it is not standard).

Re: how to find and set read image file path

Posted: 2009-10-20T10:24:53-07:00
by harleypig
Thank you for that clarification.