-
Notifications
You must be signed in to change notification settings - Fork 25.1k
resizeMode cover doesn't scale up images #11820
Copy link
Copy link
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
resizeMode cover is supposed to make the image width and/or height the same size or bigger than the containing view so that the image fully covers the area of the view.
Currently that only happens if the image is too big. A small image is not being rescaled properly.
Reproduction
Testing was done with network images.
Suppose we're trying to display a 200x200 image to cover a 250x250 View. The current logic would only scale the image down if necessary, and since in that case it isn't - it would end up causing the image to have white borders.
Solution
Scale image up if resizeMode is cover and image is smaller than the View size we're trying to fill.
Additional Information
- React Native version: 0.39
- Platform: both ios & android
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.