Make WordPress Core


Ignore:
Timestamp:
02/11/2008 09:02:44 AM (19 years ago)
Author:
matt
Message:

Blow out mem limit, slightly larger thumbnails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r6784 r6786  
    4141        }
    4242
    43         @ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $sourceImageWidth, $sourceImageHeight );
     43        imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $sourceImageWidth, $sourceImageHeight );
    4444
    4545        imagedestroy( $image ); // Free up memory
     
    154154
    155155                if ( $max < 0 || $metadata['width'] * $metadata['height'] < $max ) {
    156                         $max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
     156                        $max_side = apply_filters( 'wp_thumbnail_max_side_length', 140, $attachment_id, $file );
    157157                        $thumb = wp_create_thumbnail( $file, $max_side );
    158 
    159158                        if ( @file_exists($thumb) )
    160159                                $metadata['thumb'] = basename($thumb);
     
    189188                return __('The GD image library is not installed.');
    190189
    191         $image = @imagecreatefromstring( @file_get_contents( $file ) );
     190        // Set artificially high because GD uses uncompressed images in memory
     191        @ini_set('memory_limit', '256M');
     192        $image = imagecreatefromstring( file_get_contents( $file ) );
    192193
    193194        if ( !is_resource( $image ) )
Note: See TracChangeset for help on using the changeset viewer.