[magick-users] Resource disk-limit - PerlMagick
duc.sequere.aut.de.via.decede at imagemagick.org
duc.sequere.aut.de.via.decede at imagemagick.org
Mon Jul 21 06:52:24 PDT 2008
> $img->SetAttribute('disk-limit' => ...
We use it in our scripts and it appears to work properly. We use
$img->SetAttribute('disk-limit'=>'1gb');
This prevents any image from consuming more that 1gb on disk. We also use
$img->Ping() and check the image dimensions:
@extents=$image->Ping("$format$path/MagickStudio.mpc$scene");
$extent=0;
for ($i=0; $i < $#extents; $i+=4) { $extent+=$extents[$i]*$extents[$i+1]; }
Error('Image extents exceeds maximum allowable') if $extent &&
($extent > (1024*$MaxImageExtent));
More information about the Magick-users
mailing list