aboutsummaryrefslogtreecommitdiffstats
path: root/iphone/FixMyStreet/Classes/InputTableViewController.m
diff options
context:
space:
mode:
authormatthew <matthew>2008-10-28 12:42:05 +0000
committermatthew <matthew>2008-10-28 12:42:05 +0000
commit6373542458b545513e6e50ad2b904d531aaa5c6c (patch)
tree01c94f2ec2787432e990bcc3d6610c52d574957a /iphone/FixMyStreet/Classes/InputTableViewController.m
parent5d920990eaca496eed1d48619b71661253cc270f (diff)
Convert image to JPEG as soon as we have it; that stores/restores okay thankfully (UIImage just pauses/crashes simulator on /next/ run&quit.)
Diffstat (limited to 'iphone/FixMyStreet/Classes/InputTableViewController.m')
-rw-r--r--iphone/FixMyStreet/Classes/InputTableViewController.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/iphone/FixMyStreet/Classes/InputTableViewController.m b/iphone/FixMyStreet/Classes/InputTableViewController.m
index 91c7ec5e9..7cd8f5d02 100644
--- a/iphone/FixMyStreet/Classes/InputTableViewController.m
+++ b/iphone/FixMyStreet/Classes/InputTableViewController.m
@@ -56,7 +56,9 @@
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
if (delegate.image) {
- imageView.image = delegate.image;
+ UIImage *newImage = [[UIImage alloc] initWithData:delegate.image];
+ imageView.image = newImage;
+ [newImage release];
}
}
@@ -255,7 +257,8 @@
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)newImage editingInfo:(NSDictionary *)editingInfo {
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
- delegate.image = newImage;
+ NSData *imageData = UIImageJPEGRepresentation(newImage, 0.8);
+ delegate.image = imageData;
imageView.image = newImage;