diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-09-22 14:53:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-09-22 14:53:15 +0000 |
commit | 742308f3e3646dd27ef9679ba2ae8756a2a64f7c (patch) | |
tree | 6e8f4d279b8c647b3e5f8f9974352cbe177d7b6a /apps/graphics/tiff/tiff_addstrip.c | |
parent | 4a6bae6e0114f9856d6b31228faf9cc14144f1f2 (diff) | |
download | nuttx-742308f3e3646dd27ef9679ba2ae8756a2a64f7c.tar.gz nuttx-742308f3e3646dd27ef9679ba2ae8756a2a64f7c.tar.bz2 nuttx-742308f3e3646dd27ef9679ba2ae8756a2a64f7c.zip |
Add TIFF unit test
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3969 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/graphics/tiff/tiff_addstrip.c')
-rw-r--r-- | apps/graphics/tiff/tiff_addstrip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/graphics/tiff/tiff_addstrip.c b/apps/graphics/tiff/tiff_addstrip.c index 929a3a70e..165eec5ae 100644 --- a/apps/graphics/tiff/tiff_addstrip.c +++ b/apps/graphics/tiff/tiff_addstrip.c @@ -113,9 +113,9 @@ int tiff_convstrip(FAR struct tiff_info_s *info, FAR const uint8_t *strip) /* Convert RGB565 to RGB888 */ rgb565 = *src++; - *dest++ = (rgb565 >> 11); - *dest++ = (rgb565 >> 5) & 0x3f; - *dest++ = rgb565 & 0x1f; + *dest++ = (rgb565 >> (11-3)) & 0xf8; /* Move bits 11-15 to 3-7 */ + *dest++ = (rgb565 >> ( 5-2)) & 0xfc; /* Move bits 5-10 to 2-7 */ + *dest++ = (rgb565 << ( 3)) & 0xf8; /* Move bits 0- 4 to 3-7 */ /* Update the byte count */ |