The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Image::Simple::Gradient create simple gradients for your perl web / software application.

VERSION

Version 0.05

SYNOPSIS

Create simple gradient images with this module. If you are looking for a way to render a gradient image going from one color to another color, this is the module for it. Its useful when your designer needs an easy simple way to generate gradient colors for a webpage or application software.

direction can be: up, down, left, right. height and width: in pixels. color_begin and color_end are rgb hex values with 6 digits. ex: FF0000

    use Image::Simple::Gradient;

    my $im = Image::Simple::Gradient->new({
        color_begin => 'FF0000',
        color_end => '0000FF',
        direction => 'up',
        height => 100,
        width => 200,
        });
    my $im = $image->render_gradient();

    if (open FH, "> my_gradient.jpg") {
      binmode FH;
      my $IO = fileno(FH);
      print FH $im, $filename;
      }

EXPORT

A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module.

SUBROUTINES/METHODS

new( HASH_REF );

A hash reference must be passed on construction.

Follow the example:

    my $image = Image::Simple::Gradient->new({
        color_begin => 'FF0000',
        color_end => '0000FF',
        direction => 'up',
        height => 100,
        width => 200,
        });
render_gradient();

Renders the image and returns a jpg. ie:

    my $im = $image->render_gradient();

MODULE AUTHOR

Hernan Lopes, <hernanlopes at gmail.com>

ORIGINAL AUTHOR

Michal Guerquin, <michalg at gmail.com>

BUGS

Please report any bugs or feature requests to bug-image-simple-gradient at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Image-Simple-Gradient. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Image::Simple::Gradient

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2010 Hernan Lopes.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 190:

You forgot a '=back' before '=head1'