From 1d897b2ba107f0c3d1383feda707e14517ed291f Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Mon, 20 Jan 2020 14:29:02 -0700 Subject: [PATCH] Swap red and blue colors with tight encoding --- src/tight.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tight.c b/src/tight.c index b5f571d..f73e5f6 100644 --- a/src/tight.c +++ b/src/tight.c @@ -20,16 +20,16 @@ enum TJPF get_jpeg_pixfmt(uint32_t fourcc) switch (fourcc) { case DRM_FORMAT_RGBA8888: case DRM_FORMAT_RGBX8888: - return TJPF_XRGB; + return TJPF_XBGR; case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: - return TJPF_XBGR; + return TJPF_XRGB; case DRM_FORMAT_ARGB8888: case DRM_FORMAT_XRGB8888: - return TJPF_RGBX; + return TJPF_BGRX; case DRM_FORMAT_ABGR8888: case DRM_FORMAT_XBGR8888: - return TJPF_BGRX; + return TJPF_RGBX; } return TJPF_UNKNOWN;