Author image Hendrik Van Belleghem

NAME

Image::Filter - Apply filters onto images.

SYNOPSIS

    use Image::Filter;

    $image = Image::Filter::newFromJpeg("munich.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. A limited number of filters are included (see list below). Image::Filter currently does true color images images. It uses the gd2 lib from Thomas Boutell.

EXPORT

None by default.

FILTERS

Blur

Basic, none to fancy, blur routine (truecolor)

Channel

Extract Red, Green or Blue channels from an image (truecolor)

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 (truecolor)

Floyd

Dither an image using basic a Floyd-Steinberg Dither algorithm.

Foo

Basic, none to fancy, foo routine. Example filter

Oh yeah, this is a dummy filter :)

Gaussian

Gaussian Blur (truecolor)

Greyscale

Basic, weighted average greyscale routine

Invert

Basic, none to fancy, invert routine (truecolor)

Level

Basic, none to fancy, level routine. Add a certain value to every RGB value (truecolor)

Oilify

Oilify algorithm. Quite processor intensive. (truecolor

Pixelize

Basic, none to fancy, pixelize routine (truecolor)

Posterize

Basic, none to fancy, Black and White posterize routine (truecolor)

Ripple

Add ripples (truecolor)

Rotate

Basic, none to fancy, Counter Clockwise Rotation routine (truecolor)

Sharpen

Basic, none to fancy, sharpen routine (truecolor)

Solarize

Solarize an image (truecolor)

Swirl

Funny rotation routine (truecolor)

Twirl

Funny rotation routine (truecolor)

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.