I had this stored in my snip manager, I cannot find the original post so pasting it here bellow. So what is this about new drawableD2D type ? I cannot find anything about it in the Plugin SDK. Only the pictureWin32DIB and pictureWin32Bitmap. Or am I misunderstanding something ?
@Björn Eiríksson: So if I understand this correctly then I would access the Raw Data of the new pictures with alpha channel in same way as the old non Alpha channel pictures ? (I mean its same data type ?)
@William Yu 1: Exactly, we now actually populate the alpha byte for drawableWin32Bitmap and drawableWin32DIB when dealing with alpha channel pictures. However, if you’re concerned about speed and efficiency I would recommend using the new drawableD2D type. You get a raw pointer to the Premultiplied BGRA bytes in that case.
Sorry Björn we forgot to update the SDK for this. Thanks for the reminder, we’ll get this remedied. However, if you wanted to get started you could modify the enum in REALplugin.h
We’ll likely be adding two additional D2D types, but for that particular one it’ll be the raw pointer to the pre-multiplied BGRA bytes that you can manipulate directly.
Well, having the pictureDrawableD2D as just a byte pointer is okay and seems to work.
Of course having access to the underlaying object per platform is helpful, so we can retain it and keep a reference ourselves.