Changeset 16382
- Timestamp:
- 2008-07-14T14:38:47+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ImageConverter.pm
r16025 r16382 29 29 30 30 use strict; 31 no strict 'refs'; # allow filehandles to be variables and viceversa 32 31 33 use gsprintf 'gsprintf'; 32 34 … … 142 144 &gsprintf($outhandle, "ImageConverter: {ImageConverter.noconversionavailable} ({ImageConverter.".$self->{'no_image_conversion_reason'}."})\n"); 143 145 } 146 144 147 } 145 148 … … 149 152 # generate screenview if required 150 153 # discover image metadata 154 # filename_no_path must be in utf8 151 155 sub generate_images { 152 156 my $self = shift(@_); … … 191 195 192 196 # add Image metadata 193 $doc_obj->add_metadata($section, "Image", $filename_no_path); 194 195 # Source and SourceUTF8 - should this be converted filename or original? 196 # here we overwrite the originals with converted ones 197 $self->set_Source_metadata($doc_obj, $filename_no_path); 197 $doc_obj->add_utf8_metadata($section, "Image", $filename_no_path); 198 199 # here we overwrite the original with the potentially converted one 200 $doc_obj->set_utf8_metadata_element($section, "Source", $filename_no_path); 198 201 199 202 # use identify to get info about the (possibly converted) image … … 245 248 "image/$thumbnailtype",$section); 246 249 $doc_obj->add_metadata ($section, "ThumbType", $thumbnailtype); 247 $doc_obj->add_ metadata ($section, "Thumb", $filehead."_thumb.$thumbnailtype");250 $doc_obj->add_utf8_metadata ($section, "Thumb", $filehead."_thumb.$thumbnailtype"); 248 251 249 252 $doc_obj->add_metadata ($section, "thumbicon", "<img src=\"_httpprefix_/collect/[collection]/index/assoc/$assocfilemeta/[Thumb]\" width=[ThumbWidth] height=[ThumbHeight]>"); … … 282 285 $doc_obj->associate_file("$screenviewfilename", $filehead."_screen.$screenviewtype", "image/$screenviewtype",$section); 283 286 $doc_obj->add_metadata ($section, "ScreenType", $screenviewtype); 284 $doc_obj->add_ metadata ($section, "Screen", $filehead."_screen.$screenviewtype");287 $doc_obj->add_utf8_metadata ($section, "Screen", $filehead."_screen.$screenviewtype"); 285 288 286 289 $doc_obj->add_metadata ($section, "screenicon", "<img src=\"_httpprefix_/collect/[collection]/index/assoc/$assocfilemeta/[Screen]\" width=[ScreenWidth] height=[ScreenHeight]>");
Note:
See TracChangeset
for help on using the changeset viewer.