MAGICK_TMPDIR vs MAGICK_TEMPORARY_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
icrew
Posts: 4
Joined: 2014-01-23T15:25:37-07:00
Authentication code: 6789

MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by icrew »

Hello:

The page at http://www.imagemagick.org/script/resou ... nvironment says that the correct environment variable to set so that ImageMagick temporary files (specifically the magick-XX files) are stored someplace other than /tmp is MAGICK_TEMPORARY_PATH. However, the site admin user "magick" on this board said that the environment variable was "MAGICK_TMPDIR" in the post at viewtopic.php?f=3&t=15534.

So, which is correct?

I ask, because I've been setting MAGICK_TEMPORARY_PATH on my (Redhat linux) system running ImageMagick 6.5.4-7 2012-04-10 Q16 OpenMP, but the magick-XX files are still winding up in /tmp, filling the root partition, and causing all manner of headaches.

Thanks!

Ian Crew
University of California, Berkeley
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by fmw42 »

icrew
Posts: 4
Joined: 2014-01-23T15:25:37-07:00
Authentication code: 6789

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by icrew »

Thanks, fmw42, but that's exactly the first page I linked to in my post. The thing is that the information there (a) doesn't seem to be working for me, and (b) doesn't agree with a post from user "magick" here. It's that discrepancy that I'm asking about.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by glennrp »

In resource.c of IM-6.8.8-2, both MAGICK_TMPDIR and MAGICK_TEMPORARY_PATH seem to be nearly equivalent,
although MAGICK_TEMPORARY_PATH will be used instead of MAGICK_TMPDIR if both are defined.

if (directory == (char *) NULL)
directory=GetEnvironmentValue("MAGICK_TEMPORARY_PATH");
if (directory == (char *) NULL)
directory=GetEnvironmentValue("MAGICK_TMPDIR");

I haven't got a copy of 6.5.4, but in 6.5.3-10 and 6.6.0-10, only MAGICK_TEMPORARY_PATH is understood in resource.c

If the internal MAGICK_* variables don't work for you, try setting TMPDIR instead.
icrew
Posts: 4
Joined: 2014-01-23T15:25:37-07:00
Authentication code: 6789

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by icrew »

Thanks glennrp! Just to confirm, when you say
try setting TMPDIR instead
, do you mean setting the "TMPDIR" environment variable? I can try that.

Cheers,

Ian
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by glennrp »

icrew wrote:Thanks glennrp! Just to confirm, when you say
try setting TMPDIR instead
, do you mean setting the "TMPDIR" environment variable? I can try that.
Ian
Yes, that's what I meant.
icrew
Posts: 4
Joined: 2014-01-23T15:25:37-07:00
Authentication code: 6789

Re: MAGICK_TMPDIR vs MAGICK_TEMPORARY_PATH?

Post by icrew »

OK, I'll give that a shot. Thanks again glennrp!
Post Reply