Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: CGBitmapContext-backed CIContext: Large memory allocations in CGContextDrawShading?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGBitmapContext-backed CIContext: Large memory allocations in CGContextDrawShading?



> you might want to try to use CIContext's
>
> - (void)render:(CIImage *)im toBitmap:(void *)data rowBytes:(ptrdiff_t)
> rb
>      bounds:(CGRect)r format:(CIFormat)f colorSpace:(CGColorSpaceRef)cs;
>
> method instead of calling drawImage:... to a CGBitmapContext to get
> bits out.

Thanks Ralph, that's excellent advice! However, I noticed that the supported pixel formats (CIFormat) are limited to 32/64-bit fixed point RGBA and floating point RGBA, but I need the pixel data in an 8-bit mono format. That's achievable by using drawImage with a CIContext made from a CGBitmapContext with that format, but is there also a way I could still use render:, while getting the pixel format I need?

Thanks again,
Georg

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >CGBitmapContext-backed CIContext: Large memory allocations in CGContextDrawShading? (From: Georg Kaindl <email@hidden>)
 >Re: CGBitmapContext-backed CIContext: Large memory allocations in CGContextDrawShading? (From: Ralph Brunner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.