Changeset 2730


Ignore:
Timestamp:
Oct 13, 2008, 7:35:21 PM (16 years ago)
Author:
ronosman
Message:

Feature added: improved user feedback at the end of image processing.
Bug fixed : rotate resized images only once when images are uploaded several times.

Location:
extras/pLoader/trunk/src/Uploader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extras/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm

    r2728 r2730  
    837837
    838838sub SetNewFilesDisplayEndInfo {
    839     my ( $self ) = @_; 
     839    my ( $self, $msg ) = @_;   
    840840       
    841     $self->progressdlg->DisplayEndInfo;
     841    $self->progressdlg->DisplayEndInfo($msg);
    842842}
    843843
  • extras/pLoader/trunk/src/Uploader/ImageList.pm

    r2729 r2730  
    189189    my $count = 0;
    190190    $self->count($count);
     191    my $errors = 0;
    191192    map {
    192193        # read exif metadata
     
    256257            # remove from list
    257258            splice @{$self->images}, $i, 1;
     259            $errors++;
    258260        }
    259261       
     
    263265    }
    264266    @{$files};
    265     $self->SetNewFilesDisplayEndInfoCallback->();
     267    $self->SetNewFilesDisplayEndInfoCallback->(
     268        sprintf(
     269            "%s images added to the selection\n\n%s errors",
     270            $self->count,
     271            $errors
     272           
     273        )
     274    );
    266275   
    267276    $self->Store;
     
    469478    warn "$status" if $status ;
    470479
     480    # exif from original image
     481    my $orientation = $self->current_image->exif_metadata->{Orientation};
     482   
     483    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
     484    if( $orientation =~ m/Rotate (\d+)/ ){
     485        printf(
     486            "Rotate %s\n",
     487            $1
     488        );
     489   
     490        $image->Rotate( degrees=>$1 ); 
     491    }
    471492
    472493    $status = $image->Set(quality=>$self->quality);
     
    632653    my $rejected = 0;
    633654    my $time_begin = time;
     655    my $last_error;
    634656    map {
    635657        # current image object         
     
    692714                    $self->quality,
    693715                );
     716               
     717                $self->RotateImage(
     718                    $self->current_image->site_resized_file,
     719                );
    694720            }
    695721        };
    696         $self->RotateImage(
    697             $self->current_image->site_resized_file,
    698         );
    699722
    700723        $self->_set_exif_tag(
     
    766789            );
    767790            $rejected++;
     791            $last_error = $status_msg;
    768792        }       
    769793       
     
    786810    my $duration = $time_end - $time_begin;
    787811    $msg = sprintf(
    788         "%s images processed\n\n%s images uploaded\n\n%s images in errors and not uploaded\n\nDuration : %s seconds",
     812        "%s images processed\n\n%s images uploaded\n\n%s images in errors and not uploaded - $last_error\n\nDuration : %s seconds",
    789813        $self->count - 1,
    790814        $uploaded,
  • extras/pLoader/trunk/src/Uploader/PWG/WebServices.pm

    r2728 r2730  
    219219    );
    220220
     221
     222
    221223    return ( $result->is_success, $result->status_line );
    222224}
Note: See TracChangeset for help on using the changeset viewer.