In RVMedia 7.3.3, there is new feature for Lazarus: you can access data in TRVMBitmap using a memory image programming interface.
TRVMBitmap is a class for storing an image. For example, it is used:
- in OnGetImage events of TRVCamera and TRVCamReceiver (a new frame is received)
- or it is a class of RVCamera.GetSnapShot.Bitmap,
- or in RVCamera.OnNewImage event (providing frames for video in DeviceType = rvdtUserData mode).
RVMBitmap.Data is an array of 32-bit pixels, RVMBitmap.Width and Height are image size.
RVMBitmap has functions for drawing a rectangle, and for drawing another RVMBitmap at the specified coordinates. If you need more complex drawing, you can do it yourself writing directly in RVMBitmap.Data. Or you can create a TBitmap (RVMBitmap.GetBitmap), draw into it, then call UpdateData to update Data array property.
Since RVMedia 7.3.3, for Lazarus, there is another option: using RVMBitmap.MemoryImage. It returns an object of class inherited from TFPCustomImage
, so you can use TFPImageCanvas for drawing, or reading/writing classes to read/write the image from/to streams or files, without creating TBitmap. You do not need to call UpdateData, because MemoryImage reads/writes directly from/to Data array.