Changeset 378
- Timestamp:
- Dec 21, 2010 9:44:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/ImageThumb.inc.php
r1 r378 185 185 function processFile($file_name) 186 186 { 187 // Source file determined by provided file_name. 188 $source_file = realpath($this->source_dir . '/' . $file_name); 189 187 190 // Ensure we have valid binaries. 188 191 if (!$this->_valid_binaries) { … … 252 255 253 256 // Determine if original file size is smaller than specified thumbnail size. Do not scale-up if allow_upscaling config is set to false. 254 $image_size = getimagesize( realpath($this->source_dir . '/' . $file_name));257 $image_size = getimagesize($source_file); 255 258 if ($image_size['0'] <= $s['width'] && $image_size['1'] <= $s['height'] && !$s['allow_upscaling']) { 256 259 $pnmscale_args = ' 1 '; 257 logMsg(sprintf('Image %s smaller than specified %s thumbnail size. Keeping original size.', $file_name, $s['dest_dir']), LOG_DEBUG, __FILE__, __LINE__);260 logMsg(sprintf('Image %s smaller (%sx%s) than specified %s thumbnail size (%sx%s). Keeping original size.', $source_file, $image_size['0'], $image_size['1'], $s['dest_dir'], $s['width'], $s['height']), LOG_DEBUG, __FILE__, __LINE__); 258 261 } else { 259 262 $pnmscale_args = $s['pnmscale_args']; … … 261 264 262 265 // Execute the command that creates the thumbnail. 263 $command = sprintf('%s %s /%s| %s %s | %s %s > %s/%s',266 $command = sprintf('%s %s | %s %s | %s %s > %s/%s', 264 267 escapeshellcmd($this->anytopnm_binary), 265 escapeshellcmd($this->source_dir), 266 escapeshellcmd($file_name), 268 escapeshellcmd($source_file), 267 269 escapeshellcmd($this->pnmscale_binary), 268 270 escapeshellcmd($pnmscale_args),
Note: See TracChangeset
for help on using the changeset viewer.