Setting MAGICK_TMPDIR environment variable programatically?
Posted: 2007-06-04T05:16:04-07:00
Using ImageMagick-6.2.8
ImageMagick on UNIX relies on the environment variables MAGICK_TMPDIR or TMPDIR to work out where to put temporary files.
I have ImageMagick embedded in a larger program which reads this location from a configuration file for its own purposes. It's not practical to set it in the environment before the program is run.
Is there a way in the C API to set ImageMagick's temporary directory? (Looking at the 6.2.8 code I can't see that there is, so I guess this is as much a feature request as a question!)
setenv() is not portable.
ImageMagick on UNIX relies on the environment variables MAGICK_TMPDIR or TMPDIR to work out where to put temporary files.
I have ImageMagick embedded in a larger program which reads this location from a configuration file for its own purposes. It's not practical to set it in the environment before the program is run.
Is there a way in the C API to set ImageMagick's temporary directory? (Looking at the 6.2.8 code I can't see that there is, so I guess this is as much a feature request as a question!)
setenv() is not portable.