[wp-trac] [WordPress Trac] #18799: Image editor crops specific image widths

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 28 06:44:46 UTC 2011


#18799: Image editor crops specific image widths
--------------------------+------------------------------
 Reporter:  squirreling   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by solarissmoke):

 The problem is in `image_get_intermediate_size()`, this line in
 particular:

 {{{
 if ( ( $data['width'] == $size[0] && $data['height'] <= $size[1] ) || (
 $data['height'] == $size[1] && $data['width'] <= $size[0] ) ) {
 }}}

 The original image (400x380) has an automatically generated post-thumbnail
 that has dimensions 400x288, and that is what is delivered to the image
 editor instead of the full image. This happens because the image editor
 specifically uses 400x400 as the maximum dimensions for the image to edit.
 Hence if you supply an image with either 400px width or height you have
 this problem.

 The same thing is happening in #17162 with header images - closing it as a
 duplicate as the explanation here is easier to understand.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18799#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list