Skip to content

Commit

Permalink
- removed unused hashinfo() function from Imager.xs
Browse files Browse the repository at this point in the history
- added =items for various methods, so Pod::Coverage will pick them up
  (Pod::Coverage tests to be added in 0.49)
  • Loading branch information
Tony Cook committed Mar 1, 2006
1 parent da15a3c commit 58a9ba5
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 15 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions Imager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ channel values
masked() - L<Imager::ImageTypes/masked> - make a masked image
matrix_transform() - L<Imager::Engines/"Matrix Transformations">
matrix_transform() - L<Imager::Engines/matrix_transform>
maxcolors() - L<Imager::ImageTypes/maxcolors>
Expand All @@ -3415,8 +3415,6 @@ image and use the alpha channel
scale() - L<Imager::Transformations/scale>
setscanline() - L<Imager::Draw/setscanline>
scaleX() - L<Imager::Transformations/scaleX>
scaleY() - L<Imager::Transformations/scaleY>
Expand All @@ -3426,6 +3424,10 @@ a paletted image
setpixel() - L<Imager::Draw/setpixel>
setscanline() - L<Imager::Draw/setscanline>
settag() - L<Imager::ImageTypes/settag>
set_file_limits() - L<Imager::Files/"Limiting the sizes of images you read">
string() - L<Imager::Draw/string> - draw text on an image
Expand Down
12 changes: 0 additions & 12 deletions Imager.xs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions lib/Imager/Engines.pod
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ L<Imager::regmach.pod>.

=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:
Expand Down Expand Up @@ -356,4 +360,6 @@ transparent pixels in the middle of the source image, it is B<only>
used for pixels where there is no corresponding pixel in the source
image.

=back

=cut
7 changes: 7 additions & 0 deletions lib/Imager/Files.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
51 changes: 51 additions & 0 deletions lib/Imager/Filters.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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</Types of Filters>.

=item *

many other possible parameters, see L</Types of Filters> below.

=back

=back

=head2 Types of Filters

Here is a list of the filters that are always avaliable in Imager.
Expand Down Expand Up @@ -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);
Expand All @@ -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
5 changes: 5 additions & 0 deletions lib/Imager/ImageTypes.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions lib/Imager/Transformations.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -731,6 +741,8 @@ maps to the C<red> and C<blue> channels one would use:

$img->map(maps=>[\@redmap, [], \@bluemap]);

=back

=head1 SEE ALSO

L<Imager>, L<Imager::Engines>
Expand Down

0 comments on commit 58a9ba5

Please sign in to comment.