Changeset 12858 for extensions/GThumb
- Timestamp:
- Jan 6, 2012, 5:14:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GThumb/main.inc.php
r12857 r12858 164 164 } 165 165 166 if ( !empty( $picture['tn_ext'] ) ) 167 { 168 $file = substr_replace(get_filename_wo_extension($picture['path']), '/GThumb/',strrpos($picture['path'],'/'),1).'.'.$picture['tn_ext']; 169 if (file_exists($file)) 170 { 171 list($width, $height) = getimagesize($file); 172 173 $result = array( 174 'src' => embellish_url(get_root_url().$file), 175 'width' => $width, 176 'height' => $height, 177 ); 178 } 179 } 180 166 181 $width = $picture['width']; 167 182 $height = $picture['height']; … … 182 197 $result = pwg_image::get_resize_dimensions($width, $height, 5000, $new_height); 183 198 $result['src'] = ''; 199 200 // Test thumbnail size 201 list($width, $height) = getimagesize(get_thumbnail_path($picture)); 202 if ($result['width'] == $width and $result['height'] == $height) 203 { 204 $result['src'] = get_thumbnail_url($picture); 205 } 206 184 207 $result['use_high'] = $use_high; 185 208 $result['cache_path'] = GTHUMB_CACHE_DIR.'/'.$new_height.'/';
Note: See TracChangeset
for help on using the changeset viewer.