iPad app sending image to photo library does not capture background
iPad app sending image to photo library does not capture background
- Subject: iPad app sending image to photo library does not capture background
- From: David Delmonte <email@hidden>
- Date: Fri, 30 Mar 2012 14:33:18 -0400
(I'm not sure if this question belongs in the xCode or the Cocoa list - Please forgive/enlighten me if I've chosen incorrectly).
I have an app that allows screen writing on a variety of background colors.
When I invoke the method to capture the writing to the photo library, I get the writing but without any background color.
I could use some help to figure out why..
I draw the background color simply enough with:
drawImage.backgroundColor = [UIColor someColor];
drawImage is defined as a UIImageView.
I write to drawImage ok:
UIGraphicsBeginImageContext(self.view.frame.size);
[drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), brush);
CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), red, green, blue, 1.0);
CGContextBeginPath(UIGraphicsGetCurrentContext());
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
CGContextStrokePath(UIGraphicsGetCurrentContext());
drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
savedImage.image = drawImage.image;
UIGraphicsEndImageContext();
and writing to the photo library is done like this:
UIImageWriteToSavedPhotosAlbum(drawImage.image, self, nil, nil);
I would appreciate any advice.
Thanks
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden