mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-22 04:52:51 +08:00
CB-7551 - [Camera][iOS 8] Scaled images show a white line
Signed-off-by: Shazron Abdullah <shazron@apache.org>
This commit is contained in:
parent
513bfde49e
commit
3581c595d7
@ -532,6 +532,10 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
||||
scaledSize = CGSizeMake(MIN(width * scaleFactor, targetWidth), MIN(height * scaleFactor, targetHeight));
|
||||
}
|
||||
|
||||
// If the pixels are floats, it causes a white line in iOS8 and probably other versions too
|
||||
scaledSize.width = (int)scaledSize.width;
|
||||
scaledSize.height = (int)scaledSize.height;
|
||||
|
||||
UIGraphicsBeginImageContext(scaledSize); // this will resize
|
||||
|
||||
[sourceImage drawInRect:CGRectMake(0, 0, scaledSize.width, scaledSize.height)];
|
||||
|
Loading…
Reference in New Issue
Block a user