• 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
An array of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: An array of
      • From: Seth Willits <email@hidden>
  • Prev by Date: /System/.../pbs -dump_pboard gives no output
  • Next by Date: -[NSCFData count]: unrecognized selector
  • Previous by thread: /System/.../pbs -dump_pboard gives no output
  • Next by thread: Re: An array of
  • Index(es):
    • Date
    • Thread