Skip Menu |
 

This queue is for tickets about the CGI-Application-PhotoGallery CPAN distribution.

Report information
The Basics
Id: 30322
Status: resolved
Priority: 0/
Queue: CGI-Application-PhotoGallery

People
Owner: Nobody in particular
Requestors: tlhackque [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.07
Fixed in: (no value)



Subject: Suggestion: limit size of displayed image..
Download (untitled) / with headers
text/plain 819b
High-resolution photo files can be displayed by browsers out of proportion to the window. That is, displayed thousands of pixels wide and high - with scroll bars. This is usually not what was intended. There's probably a better fix, but the following adds a max_width parameter to new(). Images larger than max_width will be scaled by the browser. If max_width is not specified, no scaling is done (same a current behavior.) Note that ideally, save picture should provide the full resolution. In single_index, at line 461 (of 0.07) add the following few lines; if( defined $self->param( 'max_width' ) ) { my $max_width = $self->param( 'max_width' ); if( $width > $max_width ) { my $scale = $max_width / $width; $width = int($width * $scale); $height = int($height * $scale); } }
Applied. Version 0.09 should hit CPAN shortly.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.