how to find and set read image file path

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
harleypig

how to find and set read image file path

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: how to find and set read image file path

Post 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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
harleypig

Re: how to find and set read image file path

Post by harleypig »

Thank you for that clarification.
Post Reply