home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / Magick.pm < prev    next >
Encoding:
Perl POD Document  |  2003-05-14  |  3.2 KB  |  124 lines

  1. package Image::Magick;
  2.  
  3. # Released Feb. 17, 1997  by Kyle Shorter (magick@wizards.dupont.com)
  4. # Public Domain
  5.  
  6. use strict;
  7. use Carp;
  8. use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
  9.  
  10. require 5.002;
  11. require Exporter;
  12. require DynaLoader;
  13. require AutoLoader;
  14.  
  15. @ISA = qw(Exporter DynaLoader);
  16. # Items to export into callers namespace by default. Note: do not export
  17. # names by default without a very good reason. Use EXPORT_OK instead.
  18. # Do not simply export all your public functions/methods/constants.
  19. @EXPORT =
  20.   qw(
  21.       Success Transparent Opaque MaxRGB WarningException
  22.       ResourceLimitWarning TypeWarning OptionWarning DelegateWarning
  23.       MissingDelegateWarning CorruptImageWarning FileOpenWarning
  24.       BlobWarning StreamWarning CacheWarning CoderWarning ModuleWarning
  25.       DrawWarning ImageWarning XServerWarning RegistryWarning
  26.       ConfigureWarning ErrorException ResourceLimitError TypeError
  27.       OptionError DelegateError MissingDelegateError CorruptImageError
  28.       FileOpenError BlobError StreamError CacheError CoderError
  29.       ModuleError DrawError ImageError XServerError RegistryError
  30.       ConfigureError FatalErrorException
  31.     );
  32.  
  33. $VERSION = '5.5.7';
  34.  
  35. sub AUTOLOAD {
  36.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  37.     # XS function.  If a constant is not found then control is passed
  38.     # to the AUTOLOAD in AutoLoader.
  39.  
  40.     my $constname;
  41.     ($constname = $AUTOLOAD) =~ s/.*:://;
  42.     my $val = constant($constname, @_ ? $_[0] : 0);
  43.     if ($! != 0) {
  44.     if ($! =~ /Invalid/) {
  45.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  46.         goto &AutoLoader::AUTOLOAD;
  47.     }
  48.     else {
  49.         my($pack,$file,$line) = caller;
  50.         die "Your vendor has not defined PerlMagick macro $pack\:\:$constname, used at $file line $line.\n";
  51.     }
  52.     }
  53.     eval "sub $AUTOLOAD { $val }";
  54.     goto &$AUTOLOAD;
  55. }
  56.  
  57. bootstrap Image::Magick $VERSION;
  58.  
  59. # Preloaded methods go here.
  60.  
  61. sub new
  62. {
  63.     my $this = shift;
  64.     my $class = ref($this) || $this || "Image::Magick";
  65.     my $self = [ ];
  66.     bless $self, $class;
  67.     $self->set(@_) if @_;
  68.     return $self;
  69. }
  70.  
  71. sub New
  72. {
  73.     my $this = shift;
  74.     my $class = ref($this) || $this || "Image::Magick";
  75.     my $self = [ ];
  76.     bless $self, $class;
  77.     $self->set(@_) if @_;
  78.     return $self;
  79. }
  80.  
  81. # Autoload methods go after =cut, and are processed by the autosplit program.
  82.  
  83. 1;
  84. __END__
  85.  
  86. =head1 NAME
  87.  
  88. Image::Magick - Perl extension for calling ImageMagick's libImageMagick routines
  89.  
  90. =head1 SYNOPSIS
  91.  
  92.   use Image::Magick;
  93.   p = new Image::Magick;
  94.   p->Read("imagefile");
  95.   p->Set(attribute => value, ...)
  96.   ($a, ...) = p->Get("attribute", ...)
  97.   p->routine(parameter => value, ...)
  98.   p->Mogrify("Routine", parameter => value, ...)
  99.   p->Write("filename");
  100.  
  101. =head1 DESCRIPTION
  102.  
  103. This Perl extension allows the reading, manipulation and writing of
  104. a large number of image file formats using the ImageMagick library.
  105. It was originally developed to be used by CGI scripts for Web pages.
  106.  
  107. A Web page has been set up for this extension. See:
  108.  
  109.     http://www.ImageMagick.org/www/perl.html
  110.  
  111. =head1 AUTHOR
  112.  
  113. Kyle Shorter    magick@wizards.dupont.com
  114.  
  115. =head1 BUGS
  116.  
  117. Has all the bugs of ImageMagick and much, much more!
  118.  
  119. =head1 SEE ALSO
  120.  
  121. perl(1).
  122.  
  123. =cut
  124.