Skip to content

Commit

Permalink
Merge with Master
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonel Galan committed Jun 26, 2012
2 parents 7b977ab + b31ebe9 commit 1f98889
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ar-project.xcodeproj/project.pbxproj
Expand Up @@ -141,9 +141,6 @@
DD0E2C1C157EC2B600F3AAF9 = { DD0E2C1C157EC2B600F3AAF9 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CE7135EE159801B500ED347E /* ImageIO.framework */,
CE7135EC1597FE3B00ED347E /* CoreMedia.framework */,
CE7135E91597FE3000ED347E /* CoreVideo.framework */,
DD0E2C31157EC2B700F3AAF9 /* ar-project */, DD0E2C31157EC2B700F3AAF9 /* ar-project */,
DD0E2C2A157EC2B700F3AAF9 /* Frameworks */, DD0E2C2A157EC2B700F3AAF9 /* Frameworks */,
DD0E2C28157EC2B700F3AAF9 /* Products */, DD0E2C28157EC2B700F3AAF9 /* Products */,
Expand All @@ -161,6 +158,9 @@
DD0E2C2A157EC2B700F3AAF9 /* Frameworks */ = { DD0E2C2A157EC2B700F3AAF9 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CE7135EE159801B500ED347E /* ImageIO.framework */,
CE7135EC1597FE3B00ED347E /* CoreMedia.framework */,
CE7135E91597FE3000ED347E /* CoreVideo.framework */,
DDD116FA1587C3F900490B53 /* MapKit.framework */, DDD116FA1587C3F900490B53 /* MapKit.framework */,
DD847AD9157FD2C100855FEA /* CoreLocation.framework */, DD847AD9157FD2C100855FEA /* CoreLocation.framework */,
DD0E2C6B157ECA1900F3AAF9 /* AVFoundation.framework */, DD0E2C6B157ECA1900F3AAF9 /* AVFoundation.framework */,
Expand Down
16 changes: 15 additions & 1 deletion ar-project/ARViewController.m
Expand Up @@ -113,7 +113,21 @@ -(IBAction)captureView:(id)sender
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer]; NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
UIImage *image = [[UIImage alloc] initWithData:imageData]; UIImage *image = [[UIImage alloc] initWithData:imageData];


_sharedPicture = image; UIImage *overlay = imageView.image;

UIGraphicsBeginImageContext(image.size);

// Use existing opacity as is
[image drawInRect:CGRectMake(0,0,image.size.width,image.size.height)];

// Apply supplied opacity if applicable
[image drawInRect:CGRectMake(0,0,overlay.size.width,overlay.size.height) blendMode:kCGBlendModeNormal alpha:0.8];

UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

_sharedPicture = newImage;
}]; }];
[self showMessage]; [self showMessage];
} }
Expand Down

0 comments on commit 1f98889

Please sign in to comment.