Skip to main content
Inspiring
June 4, 2021
Question

Does anyone have code for generating a CGImageRef or CGContextRef from a PF_EffectWorld?

  • June 4, 2021
  • 1 reply
  • 274 views

Hey Folks,

 

I'm writing a Mac-based AE plugin, and I need to create a Mac-compatible image from a PF_EffectWorld. Has anyone written code to do that? I have it working with 8-bits per channel images, but I can't seem to get 16-bit working. I basically need to create a CGImageRef or CGContextRef from a PF_EffectWorld that is either 8-bits or 16-bits per channel.

 

James

This topic has been closed for replies.

1 reply

Community Expert
June 4, 2021

isn't a CGImageRef always 8bits?

in any case, you can alocate ram for a new buffer, convert your 16bpc image into an 8bpc image, and the convert that buffer into a CGImageRef.

am i missing something here?