[wp-trac] [WordPress Trac] #18297: Cropping in step 2 in Custom_Image_Header

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 29 20:35:20 UTC 2011


#18297: Cropping in step 2 in Custom_Image_Header
--------------------------+------------------------------
 Reporter:  wpsmith       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by wpsmith):

 So the JS could be:

 {{{
 if (yimg > yint) && (ximg > xinit) {
                         if ( yimg < yinit || ximg < xinit ) {
                                 if ( ximg / yimg > ratio ) {
                                         yinit = yimg;
                                         xinit = yinit * ratio;
                                 } else {
                                         xinit = ximg;
                                         yinit = xinit / ratio;
                                 }
                         }
                 }
 }}}

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


More information about the wp-trac mailing list