• 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
Problem to save a CIImage using a CGImageRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem to save a CIImage using a CGImageRef


  • Subject: Problem to save a CIImage using a CGImageRef
  • From: paul morel <email@hidden>
  • Date: Fri, 2 Apr 2010 04:40:38 +0200
  • Importance: Normal

Hi ,I'm having some trouble to save an image.
Here is what I do:
NSBitmapImageRep* rep = [[[NSBitmapImageRep alloc] initWithCIImage: myCiImage] autorelease];
CGImageRef image = [rep CGImage];NSURL *               url = [NSURL fileURLWithPath: path];
CGImageDestinationRef dest = CGImageDestinationCreateWithURL((CFURLRef)url, (CFStringRef)newUTType, 1, NULL);

if (dest)
{
CGImageDestinationAddImage(dest, image, (CFDictionaryRef)[saveOptions imageProperties]);
if(!CGImageDestinationFinalize(dest))
{NSLog(@"Error writing file");
}
CFRelease(dest);

And I have an error when it is doing CGImageDestinationFinalize(dest)Sometimes it is written : Program received signal:  “EXC_BAD_ACCESS”.and sometimes :<Error>: kCGErrorIllegalArgument: CGSReleaseRegion : Invalid region

Does anybody knows where it comes from? Apparently it would come from the conversion from a CIImage to a CGImageRef but I don't undesrtand why.Or is there somebody who would know how to save a CIImage ?
Thanks,
Paul
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: How to get tiff from clipboard and convert to bmp?
  • Next by Date: (no subject)
  • Previous by thread: Re: How to get tiff from clipboard and convert to bmp?
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread