Post

Replies

Boosts

Views

Activity

Render CIIMage to CVPixelBuffer in arbitrary position
I need to render an image into / onto a CVPixelBuffer in an arbitrarilty positioned rectangle this was working fine usingrender:toCVPixelBuffer:bounds:colorSpace:but the functionality of the bounds parameter changed with IOS 9, and now I can only get it to render to the bottom left corner. Am I missing another API that will let me render to anywhere within the bounds of CVPixelBuffer? I've looked and so far have been confounded.thanks for any pointers to other APIs that might work.... From the header docs.../ Render 'image' to the given CVPixelBufferRef.* The 'bounds' parameter has the following behavior:* In OS X and iOS 9 and later: The 'image' is rendered into 'buffer' so that* point (0,0) of 'image' aligns to the lower left corner of 'buffer'.* The 'bounds' acts like a clip rect to limit what region of 'buffer' is modified.* In iOS 8 and earlier: The 'bounds' parameter acts to specify the region of 'image' to render.* This region (regarless of its origin) is rendered at upper-left corner of 'buffer'.* If 'colorSpace' is nil, CI will not color match to the destination.*/
2
0
2k
Sep ’16