Apache-ImageMagick
view release on metacpan or search on metacpan
ImageMagick.pm view on Meta::CPAN
colorspace
compression
delay
density
dispose
dither
display
file
filename
font
fuzz
green-primary
index
interlace
iterations
loop
magick
matte
mattecolor
monochrome
page
pixel
pointsize
preview
quality
red-primary
rendering-intent
scene
subimage
subrange
server
size
tile
texture
type
units
verbose
white-point
Image
base-columns
base-filename
base-rows
class
colors
comment
columns
depth
directory
error
filesize
format
gamma
geometry
height
label
maximum-error
mean-error
montage
rows
signature
taint
width
x-resolution
y-resolution) ;
# ---------------------------------------------------------------------------
#
# find a image with the same base name, but of different type
#
sub find_image
{
my ($r, $directory, $base) = @_;
my $dh = DirHandle->new($directory) or return;
my $source;
for my $entry ($dh->read)
{
my $candidate = fileparse($entry, '\.\w+');
if ($base eq $candidate || $base eq $entry)
{
# determine whether this is an image file
$source = join '', $directory, $entry;
my $subr = $r->lookup_file($source);
last if $subr->content_type =~ m:^image/:;
$source = "";
}
}
$dh->close;
return $source;
}
# ---------------------------------------------------------------------------
#
# compile, cache and execute external script
#
sub execute_script
{
my ($script, $r, $image, $filter, $args) = @_ ;
return 1 if (!-r $script) ;
my $package ;
my $sub ;
if ($scriptmtime{$script} != -M _)
{ # load and compile script
$r -> log_error ("Apache::ImageMagick: Compile $script") if ($debug) ;
my $content ;
{
local $/ = undef ;
open FH, $script or do { $r -> log_error ("Apache::ImageMagick: Cannot open script $script ($!)") ; return undef ; } ;
$content = <FH> ;
close FH ;
}
$package = "Apache::ImageMagick::_$packnum" ;
$packnum++ ;
( run in 1.291 second using v1.01-cache-2.11-cpan-39bf76dae61 )