aboutsummaryrefslogtreecommitdiffstats
path: root/android/camera
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-09-21 16:22:40 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-09-21 16:22:40 -0700
commit6ef999d93532fdb0b9f22e14bf2095e4d3ee0355 (patch)
tree2499198b81be2a3e6d0f9b680ba35077537f80bc /android/camera
parentddd59b14583126d6282d2fab3142171934981e85 (diff)
downloadexternal_qemu-6ef999d93532fdb0b9f22e14bf2095e4d3ee0355.zip
external_qemu-6ef999d93532fdb0b9f22e14bf2095e4d3ee0355.tar.gz
external_qemu-6ef999d93532fdb0b9f22e14bf2095e4d3ee0355.tar.bz2
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
Diffstat (limited to 'android/camera')
-rwxr-xr-xandroid/camera/camera-capture-windows.c4
1 files changed, 2 insertions, 2 deletions
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);