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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-31-2009, 05:48 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 1
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
Old 08-31-2009, 08:01 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 186
Default

self.imagepicker.allowsImageEditing = TRUE; now if you could elaborate on how to use an image once you have saved it, i would appreciate that
rywola is offline   Reply With Quote
Reply

Bookmarks

Tags
camera, initwithimage, photo, uiimagepickercontroller, uiimageview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 276
26 members and 250 guests
ADY, Bertrand21, Dani77, Dattee, fkmtc, HDshot, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, mer10, NSeven, prchn4christ, Rudy, sacha1996, silverwiz, sneaky, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:06 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0