Changeset 15177 for gsdl/trunk/perllib/plugins/ImagePlug.pm
- Timestamp:
- 2008-04-09T17:17:53+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ImagePlug.pm
r14960 r15177 332 332 } 333 333 } 334 334 elsif ($result =~ m/^.* (([0-9]+)(\.([0-9]+))?e\+([0-9]+))(kb|b)?/) { 335 # Deals with file sizes on Linux of type "3.4e+02kb" where e+02 is 1*10^2. 336 # 3.4e+02 therefore evaluates to 3.4 x 1 x 10^2 = 340kb. 337 # Programming languages including Perl know how that 3.4e+02 is a number, 338 # so we don't need to do any calculations. 339 $size = $1*1; # turn the string into a number by multiplying it by 1 340 #if we did $size = $1; $size would be merely the string "3.4e+02" 341 $size = int($size); # truncate size 342 } 335 343 print $outhandle "file: $image:\t $type, $width, $height, $size\n" 336 344 if ($verbosity > 2);
Note:
See TracChangeset
for help on using the changeset viewer.