NAME
Image::Filter - Apply filters onto images.
SYNOPSIS
use Image::Filter;
$image = Image::Filter::newFromJpeg("tiabw.jpg");
$image = $image->filter("blur");
$image->Jpeg("blurtest.jpg",$quality); #1-100, use negative value for default
$image->Destroy;
DESCRIPTION
Image::Filter is a perl module that can apply image filters. Currently blurring and embossing are included (several others are under development). Image::Filter currently only does Black & White images. It uses the gd lib from Thomas Boutell.
EXPORT
None by default.
FILTERS
- Blur
-
Basic, none to fancy, Black and White blur routine
- Edge
-
Basic, none to fancy, Black and White edge routine
- Emboss
-
Basic, none to fancy, Black and White emboss routine
- Eraseline
-
Erase every Nth line, with a specific color, thickness, either horizontally or vertically
- Foo
-
Basic, none to fancy, Black and White foo routine
Oh yeah, this is a dummy filter :)
- Greyscale
-
Basic, weighted average greyscale routine
- Invert
-
Basic, none to fancy, invert routine
- Level
-
Basic, none to fancy, level routine. Add a certain value to every RGB value.
- Pixelize
-
Basic, none to fancy, pixelize routine.
- Posterize
-
Basic, none to fancy, Black and White posterize routine
- Rotate
-
Basic, none to fancy, Counter Clockwise Rotation routine.
- Sharpen
-
Basic, none to fancy, Black and White sharpen routine
METHODS
- newFromJpeg($filename)
-
Load data from a JPEG file. Returns an Image::Filter instance
- newFromPng($filename)
-
Load data from a PNG file. Returns an Image::Filter instance
- newFromGd($filename)
-
Load data from a gd file. Returns an Image::Filter instance
- newFromGd2($filename)
-
Load data from a gd2 file. Returns an Image::Filter instance
- filter($image,$filter)
-
Apply a filter to an Image::Filter instance. Image preferably passed as Instance variable
$image->filter($filter);
- Jpeg($filename,$quality)
-
Dump image data to JPEG file. Existing file will be overwritten (if possible). Quality is optional. Possible values range from 0 to 100 (Higher value is higher quality). Use negative value for default quality.
- Png($filename)
-
Dump image data to PNG file. Existing file will be overwritten (if possible).
- Gd($filename)
-
Dump image data to gd file. Existing file will be overwritten (if possible).
- Gd2($filename)
-
Dump image data to gd2 file. Existing file will be overwritten (if possible).
- Destroy
-
Destroy the instance of Image::Filter. (RECOMMENDED USE)
CALL FOR PARTICIPATION
Obviously, I'm no expert in math or C. If you feel like writing some filter code or have a nice algorithm you want to see implemented, give me a shout.
AUTHOR
Hendrik Van Belleghem, <beatnik + at + quickndirty + dot + org>
LICENSE
Image::Filter is released under the GNU Public License. See COPYING and COPYRIGHT for more information.
THANKS & CREDITS
Image::Filter is based on the concepts tought to me by my math professor J. Van Hee. This module wouldn't be possible without the work of Thomas Boutell on his gd library. Inspiration, but no code, was taken from Lincoln D. Steins GD implementation of that same gd lib.
SEE ALSO
perl.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 48:
'=item' outside of any '=over'
- Around line 98:
You forgot a '=back' before '=head1'
- Around line 100:
'=item' outside of any '=over'
- Around line 142:
You forgot a '=back' before '=head1'