Changeset 4422 for extensions/pLoader/trunk/src/Uploader/ImageList.pm
- Timestamp:
- Dec 4, 2009, 10:30:31 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r4409 r4422 43 43 blur 44 44 quality 45 resize_w 46 resize_h 47 hd_filter 48 hd_blur 49 hd_quality 50 hd_w 51 hd_h 52 hd_interlace 45 53 prefix 46 54 author 47 55 count 48 resize_w49 resize_h50 56 new_files 51 57 storable_file … … 80 86 pwg 81 87 upload_high 88 upload_hd 82 89 remove_uploaded_from_selection 83 90 wx_quality … … 721 728 resize_w 722 729 resize_h 730 hd_filter 731 hd_blur 732 hd_quality 733 hd_w 734 hd_h 735 hd_interlace 723 736 new_files 724 737 storable_file … … 734 747 default_name_prefix 735 748 upload_high 749 upload_hd 736 750 remove_uploaded_from_selection 737 751 auto_rotate … … 829 843 } 830 844 845 my $decode = { 846 'No' => 0, 847 'Yes, use HD resized of the original photo' => 'HD', 848 'Yes, use a copy of the original photo' => 'ORIGINAL', 849 }; 850 851 $self->upload_high( 852 $decode->{$self->upload_hd} 853 ); 854 831 855 # if upload high, rotate a copy of original file 832 856 if($self->upload_high){ … … 1051 1075 my ( $self ) = @_; 1052 1076 1077 printf("CreateHigh %s\n", $self->upload_high); 1053 1078 my $bModifyOriginal; 1054 1079 my $bRotate; 1055 1080 my $bAddWatermark; 1081 my $bResize; 1056 1082 my $orientation = $self->current_image->exif_metadata->{Orientation}; 1083 my $degrees; 1057 1084 1058 1085 # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW … … 1060 1087 $bModifyOriginal = 1; 1061 1088 $bRotate = 1; 1089 $degrees = $1; 1062 1090 } 1063 1091 … … 1066 1094 $bAddWatermark = 1; 1067 1095 } 1096 1097 # HD resize 1098 if('HD' eq $self->upload_high){ 1099 $bModifyOriginal = 1; 1100 $bResize = 1; 1101 } 1068 1102 1069 1103 if($bModifyOriginal){ … … 1077 1111 warn "$status ", $self->current_image->file, "\n" if $status ; 1078 1112 return 0 if $status; 1079 1113 if($bResize){ 1114 $status = $image->Resize( 1115 geometry => sprintf("%sx%s>", $self->hd_w, $self->hd_h), 1116 filter => sprintf("%s", $self->hd_filter), 1117 blur => $self->hd_blur 1118 ); 1119 warn "$status" if $status ; 1120 return 0 if $status; 1121 } 1122 1123 printf("resize with quality value %s\n", $self->quality); 1124 $status = $image->Set(quality=>$self->quality); 1125 warn "$status" if $status ; 1126 1127 $status = $image->Set(interlace=>$self->interlace); 1128 warn "$status" if $status ; 1129 1080 1130 if($bRotate){ 1081 $image->Rotate( degrees=>$ 1);1131 $image->Rotate( degrees=>$degrees ); 1082 1132 } 1083 1133 $image->Write( … … 1134 1184 my ( $filename, $ext ) = split /\./, $file ; 1135 1185 1136 # high_file is a copyof original1186 # high_file is a resized of original 1137 1187 $self->current_image->site_high_file( 1138 1188 File::Spec->catfile(
Note: See TracChangeset
for help on using the changeset viewer.