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 08-31-2009, 04:48 PM   #1 (permalink)
sbuchbin
Registered Member
 
Join Date: Aug 2009
Posts: 1
sbuchbin is on a distinguished road
Default UIImageView from UIImagePickerController. how do I apply editing info?

I'm not having a problem setting a UIImageView in my controller from the image selected in my UIImagePickerController; however, I CANNOT for the life of me, figure out how to apply the editing information to that UIImageView

I have my image being set correctly and passing the 'UIImage' reference to my ViewController (I'm not saving the photo yet on purpose):

Code:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{

	// SAVE THE IMAGE to the DOCSFOLDER
	int i = 0;
	
	
	/* Do not want to save file just yet....
	NSString *uniquePath = [DOCSFOLDER stringByAppendingPathComponent:@"selectedImage.png"];
	

	while([[NSFileManager defaultManager] fileExistsAtPath:uniquePath])
	{
		uniquePath = [NSString stringWithFormat:@"%@%@-%d.%@", DOCSFOLDER,@"selectedImage", ++i, @"png"];
	}

	
	[UIImagePNGRepresentation(image) writeToFile:uniquePath atomically:YES];
	 */
	
	// pass the image to the ViewController
	[controller setActiveImage:image];
	
	// control ends
	[[self parentViewController] dismissModalViewControllerAnimated:YES];
	
	[picker release];
	
		
	
}
Then in my ViewController I set a UIImageView:

Code:
-(void)setActiveImage:(UIImage *)img{

	image = img;
	
	UIImageView *imgView = [[UIImageView alloc] initWithImage: image];
	[contentView addSubview:imgView];
	
	[img release];
	[imgView release];
}
If anyone knows how to apply the 'editingInfo' to the UIImageView, it's greatly appreciated and thank you in advance.
sbuchbin is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,179
Threads: 93,920
Posts: 402,151
Top Poster: BrianSlick (7,967)
Welcome to our newest member, Scottaclod
Powered by vBadvanced CMPS v3.1.0

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