Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-17-2009, 03:50 PM   #6 (permalink)
DenVog
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 624
DenVog is on a distinguished road
Default

Quote:
Originally Posted by RickMaddy View Post
Step 2 Involves taking the UIImage from the image picker and using some Quartz 2D methods to draw that image to a context then drawing the overlays on top of that. Then using the function you mentioned to extract an image from the context.
I have found an example that will save the active UIView to the photo library. A step closer, but it is effectively the same as taking a screen shot. It's capturing the "Take Picture" overlay, camera button, saving dialog, and everything else. The image quality seems to be degraded as well.

Code:
#pragma mark -
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
	//This grabs everything on the screen. The camera button, "saved" dialog, etc.
	UIGraphicsBeginImageContext(picker.view.bounds.size);
	[picker.view.layer renderInContext:UIGraphicsGetCurrentContext()];
	UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
	UIGraphicsEndImageContext();
	UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
	[self dismissModalViewControllerAnimated:YES];
}
This is confusing to me, as I thought by telling it to grab the "picker" view, it would only capture what was shown from the camera and its subview. Am I on the right path here? Thanks for any further guidance.
DenVog is offline   Reply With Quote
 

» Advertisements
» Online Users: 456
18 members and 438 guests
apatsufas, baja_yu, buggen, ChrisYates, Feldspar, HowEver, ilmman, IphoneSdk, jNoxx, Kieren Harrold, mer10, Paul Slocum, RobTaku, rraagg, Rudy, taylor202, TheStalker, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,635
Threads: 94,098
Posts: 402,804
Top Poster: BrianSlick (7,990)
Welcome to our newest member, sadevb61
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.