Skip to content

Commit 6154cfc

Browse files
committed
Fixed small inconsistency in example code
1 parent 94d937b commit 6154cfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ This will give you a live, filtered feed of the still camera's preview video. No
147147
Once you want to capture a photo, you use a callback block like the following:
148148

149149
[stillCamera capturePhotoProcessedUpToFilter:filter withCompletionHandler:^(UIImage *processedImage, NSError *error){
150-
NSData *dataForPNGFile = UIImageJPEGRepresentation(processedImage, 0.8);
150+
NSData *dataForJPEGFile = UIImageJPEGRepresentation(processedImage, 0.8);
151151

152152
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
153153
NSString *documentsDirectory = [paths objectAtIndex:0];
154154

155155
NSError *error2 = nil;
156-
if (![dataForPNGFile writeToFile:[documentsDirectory stringByAppendingPathComponent:@"FilteredPhoto.jpg"] options:NSAtomicWrite error:&error2])
156+
if (![dataForJPEGFile writeToFile:[documentsDirectory stringByAppendingPathComponent:@"FilteredPhoto.jpg"] options:NSAtomicWrite error:&error2])
157157
{
158158
return;
159159
}

0 commit comments

Comments
 (0)