ImageMagick reserves temporary files - is it by design or should they be automatically deleted?

I installed ImageMagick on OS X using macports (I don't think it matters, but just in case)

I am using the following:

$im = new imagick($src . '[0]'); $im->setImageFormat('png'); header("Content-Type: image/png" ); echo $im; 

and I get a good pdf to png conversion. Every time I do this, I get a file like:

 magick-23Iwt3tG 

in / private / var / tmp. They do not seem to be deleted automatically.

Do I need to delete them manually or is there an option that I can set so that they are automatically deleted? (I don’t want the result to be that these files are hanging around)

+8
php imagemagick
source share
3 answers

The contents of / private / var / temp can be safely removed, but not included in the scripts /etc/rc.cleanup and / etc / weekly, which delete temporary files.

You can either do it manually, or here is a script that should do it for you.

+7
source share

I think you should use Imagick :: clear () or Imagick :: destroy () at the end of your script, this takes care to clear everything.

I know this is a bit late answer to your question, sorry for that :).

+1
source share

You need to write your own script to remove them. For example, cron, or sth. Check out this link http://www.webmasterworld.com/forum88/4135.htm

0
source share

All Articles