blob: 716fa100d1c47b19144272abc9c184a063569e96 [file] [log] [blame]
cristycf0cbcc2013-02-13 23:32:58 +00001package Image::Magick::@MAGICK_ABI_SUFFIX@;
2
Cristy93b707b2017-12-06 07:05:51 -05003# Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
cristycf0cbcc2013-02-13 23:32:58 +00004# dedicated to making software imaging solutions freely available.
5#
6# You may not use this file except in compliance with the License. You may
7# obtain a copy of the License at
8#
9# http://www.imagemagick.org/script/license.php
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# Initial version, written by Kyle Shorter.
18
19use strict;
20use Carp;
21use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
22
23require 5.002;
24require Exporter;
25require DynaLoader;
26require AutoLoader;
27
28@ISA = qw(Exporter DynaLoader);
29# Items to export into callers namespace by default. Note: do not export
30# names by default without a very good reason. Use EXPORT_OK instead.
31# Do not simply export all your public functions/methods/constants.
32@EXPORT =
33 qw(
34 Success Transparent Opaque QuantumDepth QuantumRange MaxRGB
35 WarningException ResourceLimitWarning TypeWarning OptionWarning
36 DelegateWarning MissingDelegateWarning CorruptImageWarning
37 FileOpenWarning BlobWarning StreamWarning CacheWarning CoderWarning
38 ModuleWarning DrawWarning ImageWarning XServerWarning RegistryWarning
39 ConfigureWarning ErrorException ResourceLimitError TypeError
40 OptionError DelegateError MissingDelegateError CorruptImageError
41 FileOpenError BlobError StreamError CacheError CoderError
42 ModuleError DrawError ImageError XServerError RegistryError
43 ConfigureError FatalErrorException
44 );
45
46$VERSION = '@PACKAGE_PERL_VERSION@';
47
48sub AUTOLOAD {
49 # This AUTOLOAD is used to 'autoload' constants from the constant()
50 # XS function. If a constant is not found then control is passed
51 # to the AUTOLOAD in AutoLoader.
52
53 my $constname;
54 ($constname = $AUTOLOAD) =~ s/.*:://;
55 die "&${AUTOLOAD} not defined. The required ImageMagick libraries are not installed or not installed properly.\n" if $constname eq 'constant';
56 my $val = constant($constname, @_ ? $_[0] : 0);
57 if ($! != 0) {
58 if ($! =~ /Invalid/) {
59 $AutoLoader::AUTOLOAD = $AUTOLOAD;
60 goto &AutoLoader::AUTOLOAD;
61 }
62 else {
63 my($pack,$file,$line) = caller;
64 die "Your vendor has not defined PerlMagick macro $pack\:\:$constname, used at $file line $line.\n";
65 }
66 }
67 eval "sub $AUTOLOAD { $val }";
68 goto &$AUTOLOAD;
69}
70
71bootstrap Image::Magick::@MAGICK_ABI_SUFFIX@ $VERSION;
72
73# Preloaded methods go here.
74
75sub new
76{
77 my $this = shift;
78 my $class = ref($this) || $this || "Image::Magick::@MAGICK_ABI_SUFFIX@";
79 my $self = [ ];
80 bless $self, $class;
81 $self->set(@_) if @_;
82 return $self;
83}
84
85sub New
86{
87 my $this = shift;
88 my $class = ref($this) || $this || "Image::Magick::@MAGICK_ABI_SUFFIX@";
89 my $self = [ ];
90 bless $self, $class;
91 $self->set(@_) if @_;
92 return $self;
93}
94
95# Autoload methods go after =cut, and are processed by the autosplit program.
96
97END { UNLOAD () };
98
991;
100__END__
101
102=head1 NAME
103
cristy1e55b992013-12-01 14:58:39 +0000104Image::Magick::@MAGICK_ABI_SUFFIX@ - objected-oriented Perl interface to ImageMagick (@MAGICK_ABI_SUFFIX@). Use it to create, edit, compose, or convert bitmap images from within a Perl script.
cristycf0cbcc2013-02-13 23:32:58 +0000105
106=head1 SYNOPSIS
107
108 use Image::Magick::@MAGICK_ABI_SUFFIX@;
109 $p = new Image::Magick::@MAGICK_ABI_SUFFIX@;
110 $p->Read("imagefile");
111 $p->Set(attribute => value, ...)
112 ($a, ...) = $p->Get("attribute", ...)
113 $p->routine(parameter => value, ...)
114 $p->Mogrify("Routine", parameter => value, ...)
115 $p->Write("filename");
116
117=head1 DESCRIPTION
118
119This Perl extension allows the reading, manipulation and writing of
120a large number of image file formats using the ImageMagick library.
121It was originally developed to be used by CGI scripts for Web pages.
122
123A web page has been set up for this extension. See:
124
125 file://@DOCUMENTATION_PATH@/www/perl-magick.html
126 http://www.imagemagick.org/script/perl-magick.php
127
128If you have problems, go to
129
130 http://www.imagemagick.org/discourse-server/viewforum.php?f=7
131
132=head1 AUTHOR
133
134Kyle Shorter magick-users@imagemagick.org
135
136=head1 BUGS
137
138Has all the bugs of ImageMagick and much, much more!
139
140=head1 SEE ALSO
141
142perl(1).
143
144=cut