An array of
An array of
- Subject: An array of
- From: R T <email@hidden>
- Date: Sat, 5 Dec 2009 16:10:37 -0800 (PST)
I am trying to create an array of CGImageRefs that I will use to create CGLayers.
myCGImageRefImage is the CGImageRef of the key image.
Each loop, I'm trying to reload imgForLayer with this key image.
The line...imgForLayer = CGImageCreateCopy(myCGImageRefImage) ...doesn't work at all.
Given:
CGImageRef myCGImageRefImage;
NSMutableArray *thresholdsArray;// an array of NSNumbers 0,51,102,153,204,255
NSMutableArray * CGImageRefArray;
This is the faulty block of code...
- (void) processThresholds{
[CGImageRefArrayremoveAllObjects];
CGImageRefimgForLayer = NULL;// Start with no image
int cnt = [thresholdsArraycount], q = 0;float lo, hi;
do
{
lo = [[thresholdsArrayobjectAtIndex:q]floatValue];
hi = [[thresholdsArrayobjectAtIndex:q+1]floatValue];
imgForLayer = CGImageCreateCopy(myCGImageRefImage);
imgForLayer = ApplySingleZoneComposition([@"SingleZone" UTF8String], imgForLayer, lo, hi);
[CGImageRefArray addObject:[[NSValue alloc] initWithBytes:imgForLayer objCType:@encode(CGImageRef)]];
imgForLayer = NULL;
q++;
}while(q<cnt-1);
}
...Any ideas greatly appreciated,
Thanks,
Rick
_______________________________________________
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