Last modified: 2011-07-15 19:12:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30762, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28762 - Resizing to specified height broken for very thin images
Resizing to specified height broken for very thin images
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Bryan Tong Minh
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-30 18:55 UTC by Bryan Tong Minh
Modified: 2011-07-15 19:12 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Broken patch (2.73 KB, patch)
2011-04-30 20:44 UTC, Bryan Tong Minh
Details

Description Bryan Tong Minh 2011-04-30 18:55:23 UTC
Resizing an image with a width much smaller than height to a specified height is broken, because it may result in a zero pixel width. A minimum width of 1 pixel for a thumbnail should be enforced. 

See http://test.wikipedia.org/wiki/Bug_28076 to see the bug in action.
Comment 1 Mark A. Hershberger 2011-04-30 19:11:48 UTC
Did part of the patch you had on Bug #28076 fix this?  If so, could you attach that patch here?
Comment 2 Bryan Tong Minh 2011-04-30 20:44:58 UTC
Created attachment 8475 [details]
Broken patch

It should have, but it broke some other cases which I haven't fully investigated. Parser tests indicate that in some cases the height attribute of <img>s is set to -1.
Comment 3 Mark A. Hershberger 2011-05-03 14:52:07 UTC
Copying comment from triage for posterity:

  patch needs to be checked to see if it changes any 'real' image sizes and to
  confirm that it correctly ensures minimum single pixels without becoming
  inconsistent (since we refer to thumbs by their width, we can't have a 1px-wide
  image that's 50px high and another that's 500px high.)
Comment 4 Bryan Tong Minh 2011-05-03 16:45:51 UTC
Yes, that would break. We'll have to output the 1px image then and defer to client side scaling for the further downscaling.
Comment 5 Bryan Tong Minh 2011-05-14 13:41:02 UTC
Related bug 24763
Comment 6 Mark A. Hershberger 2011-05-23 19:15:12 UTC
What is the status of this?
Comment 7 Bryan Tong Minh 2011-07-15 19:12:13 UTC
r92279

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links