Added buttons to the GalleryAlbum edit view so users can rotate photos by 90 deg (RFE 620).

This commit is contained in:
kimd 2010-04-19 22:24:09 +02:00
parent 1df580f13f
commit dd72159db0
10 changed files with 338 additions and 16 deletions

View file

@ -390,6 +390,29 @@ sub processPropertiesFromFormPost {
return undef;
}
#----------------------------------------------------------------------------
=head2 rotate ( angle )
Rotate the photo clockwise by the specified C<angle> (in degrees) including the
thumbnail and all resolutions.
=cut
sub rotate {
my $self = shift;
my $angle = shift;
my $storage = $self->getStorageLocation;
# Rotate all files in the storage
foreach my $file (@{$storage->getFiles}) {
$storage->rotate($file, $angle);
}
# Re-create thumbnail
$self->generateThumbnail;
}
#----------------------------------------------------------------------------
=head2 setFile ( filename )