Apache-ImageMagick

 view release on metacpan or  search on metacpan

ImageMagick.pm  view on Meta::CPAN


##--------------------------------------------------------------------------
##
##  Copyright (c) 2002 Gerald Richter / ecos gmbh www.ecos.de
##  parts (c) Lincoln Stein & Doug MacEachern
##
##  You may distribute under the terms of either the GNU General Public 
##  License or the Artistic License, as specified in the Perl README file.
## 
##  THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 
##  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 
##  MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
##  $Id: ImageMagick.pm,v 1.13 2002/09/20 08:07:51 richter Exp $
##
##--------------------------------------------------------------------------


package Apache::ImageMagick ;


use strict;
use vars qw{$VERSION %scriptmtime %scriptsub $packnum $debug} ;

use Image::Magick ();
use File::Basename qw(fileparse);
use DirHandle ();
use Digest::MD5 ;
use Text::ParseWords ;

$VERSION = '2.0b7' ;

# define constants here instead of use Apache::Constants qw(:common);to remove dependency
use constant OK => 0 ;
use constant NOT_FOUND => 404 ;
use constant SERVER_ERROR => 500 ;
use constant DECLINED => -1 ;

$packnum = 1 ;
$debug = 0 ;


my %LegalArguments = map { $_ => 1 } 
qw (antialias adjoin authenticate
    background blue-primary bordercolor 
    cache-threshold colormap colorspace compression
    debug delay density depth dispose dither display
    endian
    filename file fill font fuzz 
    gravity green-primary
    index iterations interlace
    loop 
    magick mattecolor matte monochrome
    page pen pixel pointsize preview
    quality 
    red_primary render 
    sampling-factor scene subimage subrange server size stroke
    tile texture type 
    unit
    verbose
    white-primary
    );

my %LegalFilters = map { $_ => 1 } 
qw(Annotate AddNoise Blur Border Charcoal Chop
   Contrast Crop ColorFloodfill Colorize Comment CycleColormap
   Despeckle Draw Edge Emboss Enhance Equalize Flip Flop
   Frame Gamma Implode Label Layer Magnify Map Minify
   MatteFloodfill MedianFilter Modulate MotionBlur
   Modulate Negate Normalize OilPaint Opaque Quantize
   Raise ReduceNoise Roll Rotate Resize Sample Scale Segment Shade
   Sharpen Shave Shear Signature Stereo Solarize Spread Swirl Texture Transparent
   Threshold Trim Wave UnsharpMask Zoom);

my %QueryFilters = map { $_ => 1 } 
qw(QueryFormat QueryFont QueryColor) ;



my %Attributes = map { $_ => 1 } 
qw(
adjoin
antialias
background
blue-primary
bordercolor
cache-threshold
colormap
colorspace
compression
delay
density
dispose
dither
display



( run in 1.331 second using v1.01-cache-2.11-cpan-39bf76dae61 )