
Rudesind::Image - An object representing a single image

use Rudesind::Gallery;
my $img = Rudesind::Gallery->image('IMG_0101.JPG');
print $img->file;

This class represents a single image. It provides methods for accessing information on that image, as well as creating transformed versions of the image (resizing, rotating, etc.).

Image objects should be constructed by calling the image() method on a Rudesind::Gallery object.

This class provides the following methods:
The filesystem path, with file name, for this object.
Juse the filename, without the path.
The URI path for this image.
The value of path() both with ".html" appended. Provided for the use of the Mason UI. Use path() instead.
A title for the image. Currently, this is just the image's file name.
The Rudesind::Config object given to the constructor.
The height of the image, in pixels.
The width of the image, in pixels.
The Rudesind::Gallery object containing this image.
The URI for a thumbnail version of the image.
Calling this method will generate the thumbnail image if a cached version does not exist, using the make_transformed_image_file('thumbnail') method.
The filesystem path for this image's cached thumbnail. This method always returns a filename, whether or not the file actually exists.
Indicates whether or not there is a cached thumbnail for this image.
The URI for a transformed version of the image, based on the specified transforms.
Calling this method will generate the transformed image if a cached version does not exist, using the make_transformed_image_file() method.
The filesystem path for this image's cached transformed version, based on the specified transforms. This method always returns a filename, whether or not the file actually exists.
Indicates whether or not there is a cached transformed version of this image, based on the specified transforms.
Creates a transformed version of the image according to the specified transforms and stores it in the cached images directory, if one doesn't already exist.
This method returns the filesystem path for the file.
For any method that accepts transforms, you can specify any of the following:
The default image size and orientation. The maximum height and width allowed are the "image_page_max_height" and "image_page_max_width" configuration parameters.
The thumnail height and width of the image.
Doubles the image's size from the default, so that the maximum height and width allowed are twice the "image_page_max_height" and "image_page_max_width" configuration parameters.
Rotate the image 90 degrees clockwise. The maximum height and width allowed are the "image_page_max_height" and "image_page_max_width" configuration parameters.
Rotate the image 180 degrees. The maximum height and width allowed are the "image_page_max_height" and "image_page_max_width" configuration parameters.
Rotate the image 270 degrees clockwise. The maximum height and width allowed are the "image_page_max_height" and "image_page_max_width" configuration parameters.
It is possible to pass multiple transforms at once, so you could do this:
my $file = $image->make_transformed_image_file( 'double', 'rotate-90' );
This produces an image to which both the "double" and "rotate-90" transforms have been applied, in the specified order.
This class uses the Rudesind::Captioned role.