• 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
Re: Getting bitmap data out of an CIImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting bitmap data out of an CIImageRep


  • Subject: Re: Getting bitmap data out of an CIImageRep
  • From: Troy Stephens <email@hidden>
  • Date: Mon, 27 Jun 2005 11:14:37 -0700

On Jun 27, 2005, at 10:58 AM, Robert Brown wrote:
I have an image generated by Core Image... now I'd like to get the raw bitmap data out of the CIImage object. How?

I can create an CIImageRep, but it does not have any methods for getting the data, like NSBitmapImageRep does.

Thanks,
Robb

A CIImage is essentially a "recipe" for generating the result image on demand. To "get its [pixel] data", you must composite it into a bitmapped destination context whose pixels you can then retrieve.


The "Reducer" code sample from WWDC includes an example of doing this:

    http://developer.apple.com/samplecode/Reducer/Reducer.html

Specifically, see the -outputBitmapImageRep method in ImageReducer.m (which is complicated slightly by the addition of border and shadow- drawing support, but you can easily ignore those parts):

    http://developer.apple.com/samplecode/Reducer/listing16.html

Alternatively, if you've created an NSCIImageRep that references the CIImage, you can add it to an NSImage and then composite the NSImage into a bitmapped graphics context.

--
Troy Stephens
Cocoa Frameworks
Apple Computer, Inc.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Getting bitmap data out of an CIImageRep (From: Robert Brown <email@hidden>)

  • Prev by Date: Re: pageHeader and pageFooter
  • Next by Date: Re: easy way to refresh branch of NSOutlineView
  • Previous by thread: Getting bitmap data out of an CIImageRep
  • Next by thread: RTP support for VIOP streaming wanted...
  • Index(es):
    • Date
    • Thread