Changeset 6726 for trunk/wp-admin/includes/image.php
- Timestamp:
- 02/05/2008 06:47:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image.php
r6579 r6726 22 22 23 23 $image = wp_load_image( $file ); 24 24 25 25 if ( !is_resource( $image ) ) 26 26 return $image; … … 40 40 imagesavealpha( $thumbnail, true); 41 41 } 42 42 43 43 @ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $sourceImageWidth, $sourceImageHeight ); 44 44 45 imagedestroy( $image ); // Free up memory 45 imagedestroy( $image ); // Free up memory 46 46 47 47 // If no filters change the filename, we'll do a default transformation. … … 68 68 } 69 69 70 imagedestroy( $thumbnail ); // Free up memory 71 72 // Set correct file permissions 73 $stat = stat( dirname( $thumbpath )); 70 imagedestroy( $thumbnail ); // Free up memory 71 72 // Set correct file permissions 73 $stat = stat( dirname( $thumbpath )); 74 74 $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits 75 @ chmod( $thumbpath, $perms ); 75 @ chmod( $thumbpath, $perms ); 76 76 77 77 return apply_filters( 'wp_create_thumbnail', $thumbpath ); … … 115 115 116 116 imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); 117 118 imagedestroy( $src ); // Free up memory 117 118 imagedestroy( $src ); // Free up memory 119 119 120 120 if ( ! $dst_file ) … … 160 160 $metadata['thumb'] = basename($thumb); 161 161 } 162 162 163 163 // fetch additional metadata from exif/iptc 164 164 $image_meta = wp_read_image_metadata( $file );
Note: See TracChangeset
for help on using the changeset viewer.