• 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
CIColorMap filter usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CIColorMap filter usage


  • Subject: CIColorMap filter usage
  • From: Jason Horn <email@hidden>
  • Date: Wed, 28 Nov 2007 12:37:12 -0500

Does anyone have any experience with using the core image CIColorMap filter? I have tried looking at the example in the FunHouse example, but I still can't get it to work, even using the same example image and color map from the FunHouse project. I end up with a greyscale image. Here's my code...

// color map
NSURL *url = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource: @"colormap" ofType: @"tiff"]];
colorMap = [CIImage imageWithContentsOfURL: url];


// test image
NSURL *url = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource: @"Copenhagen" ofType: @"jpg"]];
CIImage *testImage = [CIImage imageWithContentsOfURL: url];

// filter
colorMapFilter = [CIFilter filterWithName:@"CIColorMap"];
[colorMapFilter setValue:testImage forKey:@"inputImage"];
[colorMapFilter setValue:colorMap forKey:@"inputGradientImage"];
resultImg = [colorMapFilter valueForKey: @"outputImage"];

// draw the result
[context drawImage:resultImg atPoint:cg.origin fromRect:cg];


Thanks!
_______________________________________________

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: Re: Custom-view cursor changing
  • Next by Date: Re: Subclassing NSPrintPanel
  • Previous by thread: Custom Formatters and NSTableView
  • Next by thread: New Cocoa functionality on Leopard
  • Index(es):
    • Date
    • Thread