Fix background scale quality (#5113)

UIGraphicsBeginImageContextWithOptions with scale factor 0 makes sure the device scale factor is used automatically and not 1.0
This commit is contained in:
dbenninger
2017-12-05 22:12:12 +01:00
committed by Svetoslav
parent 57ed0cf405
commit 634cf9a822

View File

@@ -338,7 +338,7 @@ function uiColorFromImage(img: UIImage, view: View, callback: (uiColor: UIColor)
if (params.sizeX > 0 && params.sizeY > 0) {
const resizeRect = CGRectMake(0, 0, params.sizeX, params.sizeY);
UIGraphicsBeginImageContext(resizeRect.size);
UIGraphicsBeginImageContextWithOptions(resizeRect.size, false, 0.0);
img.drawInRect(resizeRect);
img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();