From 6ef999d93532fdb0b9f22e14bf2095e4d3ee0355 Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Wed, 21 Sep 2011 16:22:40 -0700 Subject: Fix captured frame pixel format on Windows Apparently, bitmap obtained through the capXxx + clipboard API is formatted with BRG, not RGB format. Change-Id: Ib161be50d2d3258045a467b152a5a750e1a8fb42 --- android/camera/camera-capture-windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'android/camera') diff --git a/android/camera/camera-capture-windows.c b/android/camera/camera-capture-windows.c index 0fb172e..3d85aef 100755 --- a/android/camera/camera-capture-windows.c +++ b/android/camera/camera-capture-windows.c @@ -357,9 +357,9 @@ camera_device_start_capturing(CameraDevice* cd, if (wcd->gdi_bitmap->bmiHeader.biBitCount == 16) { wcd->pixel_format = V4L2_PIX_FMT_RGB565; } else if (wcd->gdi_bitmap->bmiHeader.biBitCount == 24) { - wcd->pixel_format = V4L2_PIX_FMT_RGB24; + wcd->pixel_format = V4L2_PIX_FMT_BGR24; } else if (wcd->gdi_bitmap->bmiHeader.biBitCount == 32) { - wcd->pixel_format = V4L2_PIX_FMT_RGB32; + wcd->pixel_format = V4L2_PIX_FMT_BGR32; } else { E("%s: Unsupported number of bits per pixel %d", __FUNCTION__, wcd->gdi_bitmap->bmiHeader.biBitCount); -- cgit v1.1