Re: Getting Pixel Data From CIImage
Subject : Re: Getting Pixel Data From CIImage
From: Michael Vannorsdel <email@hidden >
Date: Tue, 13 May 2008 02:29:02 -0600
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=d1M/kOtJm4/3RJBXaRVXo2Jk/qEeGN6kuCEub87G19g=; b=ATzcmqB3/YxPZOzsPZE8E5pMmzXpfLUAT39PEwd2EjLlHsyeaf34+XzIYkC+6OM2VdgTjLiMNfFO6MmKH0Ll0s2FJidvLG2jQusth7CIEF5zI0g+IgbXKzfeq8qf339qXgw4YdR0salwBb5ry2WD9Cfc6ABEeLPnGN4FKyfkP20=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=vUAIk3hntwxsAxw/ePeIu0zYSQNm9Gsu/m1JM1UORB4ip3ygTjarPBh19Pg8C2rUY8bYrrho7EbkP6Z1wizktPF/3LBtGD5eVaYoJ3g6GcvGgrOfZYQ7JQSxtXLqOivijRD4yHm4/R6i1k9/Zki3qWD0Vekm8LolPH3fi//ok9w=
You can also create a CGBitmapContext (with CGBitmapContextCreate) and
create a CIContext from that (with +[CIContext
contextWithCGContext:options:]) and draw to the CIContext. It will
draw the pixels into the bitmap. This will work for Tiger and Leopard.
On May 13, 2008, at 1:51 AM, Nikolai Hellwig wrote:
If you are using Leopard (10.5), you could do something like this:
CIImage* imageBlurred = .....
NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc]
initWithCIImage: imageBlurred] autorelease];
// Getting pixels data
// this returns a pointer to the pixel data
[bitmap bitmapData]
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.