[wp-trac] [WordPress Trac] #15989: image_resize_dimensions() mistakenly defaults crop center as image's center of gravity.
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 28 17:41:53 UTC 2012
#15989: image_resize_dimensions() mistakenly defaults crop center as image's center
of gravity.
------------------------------+-----------------------
Reporter: jacof | Owner: nacin
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.4
Component: Post Thumbnails | Version: 3.1
Severity: major | Resolution:
Keywords: has-patch commit |
------------------------------+-----------------------
Comment (by ebababi):
Replying to [comment:15 nacin] and [comment:16 SergeyBiryukov]:
> I would only suggest that we move the filter above the two return
false's.
I would vote against this suggestion for two reasons:
a. The two return false's purpose is to validate the input of the
function. I believe that input should be validated before reaching the
filtering chain. Is there any case that negative numbers are valid input
for original or destination image sizes?
b. As input validation before filter chaining is already implemented on
other cases, like [http://core.trac.wordpress.org/browser/trunk/wp-
includes/media.php#L142 image_downsize], shouldn't we do the same to
provide a consistent API behaviour?
Based on the above, I would insist on the [attachment:media.php.patch]
patch.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15989#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list