Update documentation with new width property

This commit is contained in:
Michaël Villeneuve 2018-02-23 16:11:41 +01:00
parent 27ea6b04c2
commit cc4520d72f
2 changed files with 2 additions and 14 deletions

View File

@ -240,6 +240,8 @@ Takes a picture, saves in your app's cache directory and returns a promise.
Supported options:
- `width` (integer). This property allows to specify the width that the returned image should have. If no value is specified the maximum image size is used (capture may take longer).
- `quality` (float between 0 to 1.0). This property is used to compress the output jpeg file with 1 meaning no jpeg compression will be applied. If no value is specified `quality:1` is used.
- `base64` (boolean true or false) Use this with `true` if you want a base64 representation of the picture taken on the return data of your promise. If no value is specified `base64:false` is used.

View File

@ -68,8 +68,6 @@
return [fileURL absoluteString];
}
<<<<<<< HEAD
=======
+ (UIImage *) scaleImage:(UIImage*)image toWidth:(NSInteger)width
{
width /= [UIScreen mainScreen].scale; // prevents image from being incorrectly resized on retina displays
@ -83,18 +81,6 @@
return [UIImage imageWithCGImage:[newImage CGImage] scale:1.0 orientation:(newImage.imageOrientation)];
}
+ (UIImage *)forceUpOrientation:(UIImage *)image
{
if (image.imageOrientation != UIImageOrientationUp) {
UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale);
[image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)];
image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}
return image;
}
>>>>>>> c03db73... Add width property on iOS. Allows to specify an image width on capture
+ (void)updatePhotoMetadata:(CMSampleBufferRef)imageSampleBuffer withAdditionalData:(NSDictionary *)additionalData inResponse:(NSMutableDictionary *)response
{
CFDictionaryRef exifAttachments = CMGetAttachment(imageSampleBuffer, kCGImagePropertyExifDictionary, NULL);