From 58a9ba585e81a26850e54a74e47ac246569709e6 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 1 Mar 2006 02:15:22 +0000 Subject: [PATCH] - removed unused hashinfo() function from Imager.xs - added =items for various methods, so Pod::Coverage will pick them up (Pod::Coverage tests to be added in 0.49) --- Changes | 5 ++++ Imager.pm | 8 ++++-- Imager.xs | 12 -------- lib/Imager/Engines.pod | 6 ++++ lib/Imager/Files.pod | 7 +++++ lib/Imager/Filters.pod | 51 ++++++++++++++++++++++++++++++++++ lib/Imager/ImageTypes.pod | 5 ++++ lib/Imager/Transformations.pod | 12 ++++++++ 8 files changed, 91 insertions(+), 15 deletions(-) diff --git a/Changes b/Changes index 7e55eef7..93b546d9 100644 --- a/Changes +++ b/Changes @@ -1366,6 +1366,11 @@ Revision history for Perl extension Imager. custom META.yml was a waste. - bump to 0.47_01 +0.48 +- removed unused hashinfo() function from Imager.xs +- added =items for various methods, so Pod::Coverage will pick them up + (Pod::Coverage tests to be added in 0.49) + ================================================================= For latest versions check the Imager-devel pages: diff --git a/Imager.pm b/Imager.pm index b36bb32b..af8ffd4d 100644 --- a/Imager.pm +++ b/Imager.pm @@ -3389,7 +3389,7 @@ channel values masked() - L - make a masked image -matrix_transform() - L +matrix_transform() - L maxcolors() - L @@ -3415,8 +3415,6 @@ image and use the alpha channel scale() - L -setscanline() - L - scaleX() - L scaleY() - L @@ -3426,6 +3424,10 @@ a paletted image setpixel() - L +setscanline() - L + +settag() - L + set_file_limits() - L string() - L - draw text on an image diff --git a/Imager.xs b/Imager.xs index 6c9dafe6..015510e3 100644 --- a/Imager.xs +++ b/Imager.xs @@ -3255,18 +3255,6 @@ i_nearest_color(im, ...) void malloc_state() -void -hashinfo(hv) - PREINIT: - HV* hv; - int stuff; - PPCODE: - if (!SvROK(ST(0))) croak("Imager: Parameter 0 must be a reference to a hash\n"); - hv=(HV*)SvRV(ST(0)); - if (SvTYPE(hv)!=SVt_PVHV) croak("Imager: Parameter 0 must be a reference to a hash\n"); - if (getint(hv,"stuff",&stuff)) printf("ok: %d\n",stuff); else printf("key doesn't exist\n"); - if (getint(hv,"stuff2",&stuff)) printf("ok: %d\n",stuff); else printf("key doesn't exist\n"); - void DSO_open(filename) char* filename diff --git a/lib/Imager/Engines.pod b/lib/Imager/Engines.pod index 6437f831..af021d3a 100644 --- a/lib/Imager/Engines.pod +++ b/lib/Imager/Engines.pod @@ -328,6 +328,10 @@ L. =head2 Matrix Transformations +=over + +=item matrix_transform + Rather than having to write code in a little language, you can use a matrix to perform affine transformations, using the matrix_transform() method: @@ -356,4 +360,6 @@ transparent pixels in the middle of the source image, it is B used for pixels where there is no corresponding pixel in the source image. +=back + =cut diff --git a/lib/Imager/Files.pod b/lib/Imager/Files.pod index 33706d0b..2f1fc970 100644 --- a/lib/Imager/Files.pod +++ b/lib/Imager/Files.pod @@ -183,6 +183,10 @@ Return either a valid Imager file type, or undef. =head2 Limiting the sizes of images you read +=over + +=item set_file_limits + In some cases you will be receiving images from an untested source, such as submissions via CGI. To prevent such images from consuming large amounts of memory, you can set limits on the dimensions of @@ -233,11 +237,14 @@ pass: # only bytes is limited Imager->set_file_limits(reset=>1, bytes=>10_000_000); +=item get_file_limits + You can get the current limits with the get_file_limits() method: my ($max_width, $max_height, $max_bytes) = Imager->get_file_limits(); +=back =head1 TYPE SPECIFIC INFORMATION diff --git a/lib/Imager/Filters.pod b/lib/Imager/Filters.pod index b5beed76..58ea995e 100644 --- a/lib/Imager/Filters.pod +++ b/lib/Imager/Filters.pod @@ -28,6 +28,26 @@ Imager::Filters - Entire Image Filtering Operations Filters are operations that have similar calling interface. +=over + +=item filter + +Parameters: + +=over + +=item * + +type - the type of filter, see L. + +=item * + +many other possible parameters, see L below. + +=back + +=back + =head2 Types of Filters Here is a list of the filters that are always avaliable in Imager. @@ -568,8 +588,37 @@ Note: This seems to test ok on the following systems: Linux, Solaris, HPUX, OpenBSD, FreeBSD, TRU64/OSF1, AIX. If you test this on other systems please let me know. +=over + +=item load_plugin + +This is a function, not a method, exported by default. You should +import this function explicitly for future compatibility if you need +it. + +Accepts a single parameter, the name of a shared library file to load. + +Returns true on success. Check Imager->errstr on failure. + +=item unload_plugin + +This is a function, not a method, which is exported by default. You +should import this function explicitly for future compatibility if you +need it. + +Accepts a single parameter, the name of a shared library to unload. +This library must have been previously loaded by load_plugin(). + +Returns true on success. Check Imager->errstr on failure. + +=back + =head2 Image Difference +=over + +=item difference + You can create a new image that is the difference between 2 other images. my $diff = $img->difference(other=>$other_img); @@ -585,4 +634,6 @@ Note that $img and $other_img must have the same number of channels. The width and heigh of $diff will be the minimum of each of the width and height of $img and $other_img. +=back + =cut diff --git a/lib/Imager/ImageTypes.pod b/lib/Imager/ImageTypes.pod index bfc7cd47..62b925ef 100644 --- a/lib/Imager/ImageTypes.pod +++ b/lib/Imager/ImageTypes.pod @@ -623,6 +623,11 @@ or by code: In each case deltag() returns the number of tags deleted. +=item settag + +settag() replaces any existing tags with a new tag. This is +equivalent to calling deltag() then addtag(). + =back =head2 Common Tags diff --git a/lib/Imager/Transformations.pod b/lib/Imager/Transformations.pod index 664bfdf2..392698d5 100644 --- a/lib/Imager/Transformations.pod +++ b/lib/Imager/Transformations.pod @@ -558,6 +558,10 @@ reason for failure. =head2 Color transformations +=over + +=item convert + You can use the convert method to transform the color space of an image using a matrix. For ease of use some presets are provided. @@ -689,8 +693,14 @@ alpha channel: [ 0, 0, 0, 0.5 ], ]); +=back + =head2 Color Mappings +=over + +=item map + You can use the map method to map the values of each channel of an image independently using a list of lookup tables. It's important to realize that the modification is made inplace. The function simply @@ -731,6 +741,8 @@ maps to the C and C channels one would use: $img->map(maps=>[\@redmap, [], \@bluemap]); +=back + =head1 SEE ALSO L, L -- 2.39.5