NAME

Image::Empty - Empty/transparent images for tracking URLs.

VERSION

Version 0.01

SYNOPSIS

Creates simple 1x1 pixel empty/transparent GIFs to use in tracking URLs.

my $empty_gif = Image::Empty->gif;

print CGI->new->header( -type => $empty_gif->type, -Content_length => $empty_gif->length );

print $empty_gif->content;

METHODS

Attributes

type

$empty_image->type;

Returns the mime/type of the image for use in HTTP headers.

length

$empty_image->length;

Returns the content length for use in HTTP headers.

disposition

$empty_image->disposition;

Returns the content disposition for use in HTTP headers.

filename

$empty_image->filename;

Returns the content filename for use in HTTP headers.

content

$empty_image->content;

Returns the image data to send in the HTTP response body.

Class Methods

gif

Image::Empty->gif;

Returns an instance of an empty GIF.

Instance Methods

render

my $gif = Image::Empty->gif;

print $gif->render( CGI->new );

Returns the output of setting the HTTP header and content.

It is the same as doing:

my $gif = Image::Empty->gif;

print CGI->new->header( -type => $gif->type, -Content_length => $gif->length );

print $gif->content;

Currently only CGI is supported.

AUTHOR

Rob Brown, <rob at intelcompute.com>

BUGS

Please report any bugs or feature requests to bug-image-empty at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Image-Empty. I will be notified, and then you will 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::Empty

You can also look for information at:

ACKNOWLEDGEMENTS

I can not actually remember where the original line came from to produce the gif content.

LICENSE AND COPYRIGHT

Copyright 2012 Rob Brown.

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.