Changeset 4760


Ignore:
Timestamp:
01/27/10 14:12:41 (10 years ago)
Author:
ronosman
Message:

Bug 1066 fixed: unexpected behaviour on resizing. Now rotate before resize.

Location:
extensions/pLoader/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/locale/fr_FR/pLoader.po

    r4727 r4760  
    634634msgid "Photo size" 
    635635msgstr "Dimension des photos" 
     636 
     637msgid "Maximum width" 
     638msgstr "Largeur maximale" 
     639 
     640msgid "Maximum height" 
     641msgstr "Hauteur maximale" 
  • extensions/pLoader/trunk/src/Uploader/ImageList.pm

    r4759 r4760  
    536536    my $w = $image->Get('width'); 
    537537    my $h = $image->Get('height'); 
    538          
    539     # should calculate the aspect ratio 
    540     my $resize_w = $self->resize_w; 
    541     my $resize_h = $self->resize_h; 
    542          
    543     if( $w < $h ){ 
    544         my $resize_w_ = $resize_w; 
    545         $resize_w = $resize_h; 
    546         $resize_h = $resize_w_; 
    547     } 
    548     #printf("resize with blur value %s\n", $self->blur); 
    549     $status = $image->Resize( 
    550         geometry => sprintf("%sx%s>", $resize_w, $resize_h),  
    551         filter => sprintf("%s", $self->filter),  
    552         blur => $self->blur 
    553     ); 
    554     warn "$status" if $status ; 
    555     return 0 if $status; 
    556538 
    557539    $status = $image->Set(Gravity=>"Center"); 
     
    570552        $image->Rotate( degrees=>$1 ) if $self->auto_rotate;     
    571553    } 
     554 
     555 
     556    #printf("resize with blur value %s\n", $self->blur); 
     557    $status = $image->Resize( 
     558        geometry => sprintf("%sx%s>", $self->resize_w, $self->resize_h),  
     559        filter => sprintf("%s", $self->filter),  
     560        blur => $self->blur 
     561    ); 
     562    warn "$status" if $status ; 
     563    return 0 if $status; 
    572564 
    573565    #printf("resize with quality value %s\n", $self->quality); 
     
    11201112        warn "$status ", $self->current_image->file, "\n" if $status ; 
    11211113        return 0 if $status; 
     1114 
     1115        if($bRotate){ 
     1116            $image->Rotate( degrees=>$degrees );     
     1117        }         
     1118        $image->Write( 
     1119            $self->current_image->site_high_file 
     1120        ); 
     1121        warn "$status ", $self->current_image->site_high_file, "\n" if $status ; 
     1122        return 0 if $status; 
     1123 
    11221124        if($bResize){ 
    11231125            $status = $image->Resize( 
     
    11371139        warn "$status" if $status ; 
    11381140         
    1139         if($bRotate){ 
    1140             $image->Rotate( degrees=>$degrees );     
    1141         }         
    1142         $image->Write( 
    1143             $self->current_image->site_high_file 
    1144         ); 
    1145         warn "$status ", $self->current_image->site_high_file, "\n" if $status ; 
    1146         return 0 if $status; 
    11471141         
    11481142        undef $image; 
Note: See TracChangeset for help on using the changeset viewer.