• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iPad app sending image to photo library does not capture background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: iPad app sending image to photo library does not capture background
      • From: David Duncan <email@hidden>
    • Re: iPad app sending image to photo library does not capture background
      • From: Luca Ciciriello <email@hidden>
  • Prev by Date: RE: 10.7 SDK in Xcode 4.4 DP2 on 10.8
  • Next by Date: Re: iPad app sending image to photo library does not capture background
  • Previous by thread: RE: 10.7 SDK in Xcode 4.4 DP2 on 10.8
  • Next by thread: Re: iPad app sending image to photo library does not capture background
  • Index(es):
    • Date
    • Thread