ICAMERA_AddOverlay() | developer.brewmp.com ICAMERA_AddOverlay() | developer.brewmp.com

Developer

ICAMERA_AddOverlay()

Forums:

can any body help me, how to use ICAMERA_AddOverlay()
i'm getting error code 20.

aditya_hyd wrote:can any body help me, how to use ICAMERA_AddOverlay()
i'm getting error code 20.
EUNSUPPORTED 20
This feature is not supported in the devide pack or target you are working!! :)

aditya_hyd wrote:can any body help me, how to use ICAMERA_AddOverlay()
i'm getting error code 20.
EUNSUPPORTED 20
This feature is not supported in the devide pack or target you are working!! :)

Unlike Java, BREW is well suited for drawing your own individual overlays over each frame of camera preview data. There are several ways to do it, but the basic premise is to get the screen DIB from the screen IBitmap after blit of the camera frame and then modify it in-place prior to leaving the camera notify function. You'll have to check the DIB nColorScheme and carefully manipulate each pixel. Most of the BREW 3.x devices use IDIB_COLORSCHEME_565 (RGB pixels of 5,6,5 bits per component packed onto 2 byte words).
Your in-place modify function will have to loop through every pixel of both your source image and overrlay image and process accordingly. Also, make sure to size a copy of your overlay image to exactly match the preview size.
- Hope this helps, David Manpearl

Unlike Java, BREW is well suited for drawing your own individual overlays over each frame of camera preview data. There are several ways to do it, but the basic premise is to get the screen DIB from the screen IBitmap after blit of the camera frame and then modify it in-place prior to leaving the camera notify function. You'll have to check the DIB nColorScheme and carefully manipulate each pixel. Most of the BREW 3.x devices use IDIB_COLORSCHEME_565 (RGB pixels of 5,6,5 bits per component packed onto 2 byte words).
Your in-place modify function will have to loop through every pixel of both your source image and overrlay image and process accordingly. Also, make sure to size a copy of your overlay image to exactly match the preview size.
- Hope this helps, David Manpearl