diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-09-21 18:40:23 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-09-21 18:40:23 +0000 |
commit | 5501b0d32807dca70cf0b6d4f252fa8b050751db (patch) | |
tree | ca2fed26cf89d4b51196d41741b06b55d5cd93a9 /apps/graphics/tiff/tiff_internal.h | |
parent | 342a2fb06c717ae0fa55e3f1fba2dc28230a073f (diff) | |
download | nuttx-5501b0d32807dca70cf0b6d4f252fa8b050751db.tar.gz nuttx-5501b0d32807dca70cf0b6d4f252fa8b050751db.tar.bz2 nuttx-5501b0d32807dca70cf0b6d4f252fa8b050751db.zip |
TIFF initialization is complete
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3967 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/graphics/tiff/tiff_internal.h')
-rw-r--r-- | apps/graphics/tiff/tiff_internal.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/apps/graphics/tiff/tiff_internal.h b/apps/graphics/tiff/tiff_internal.h index a4a8eb7fa..5c8050601 100644 --- a/apps/graphics/tiff/tiff_internal.h +++ b/apps/graphics/tiff/tiff_internal.h @@ -51,6 +51,30 @@ /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ +/* Image Type **************************************************************/ + +#define IMGFLAGS_BILEV_BIT (1 << 0) +#define IMGFLAGS_GREY_BIT (1 << 1) +#define IMGFLAGS_GREY8_BIT (1 << 2) +#define IMGFLAGS_RGB_BIT (1 << 3) +#define IMGFLAGS_RGB565_BIT (1 << 4) + +#define IMGFLAGS_FMT_Y1 (IMGFLAGS_BILEV_BIT) +#define IMGFLAGS_FMT_Y4 (IMGFLAGS_GREY_BIT) +#define IMGFLAGS_FMT_Y8 (IMGFLAGS_GREY_BIT|IMGFLAGS_GREY8_BIT) +#define IMGFLAGS_FMT_RGB16_565 (IMGFLAGS_RGB_BIT) +#define IMGFLAGS_FMT_RGB24 (IMGFLAGS_RGB_BIT|IMGFLAGS_RGB565_BIT) + +#define IMGFLAGS_ISBILEV(f) \ + (((f) & IMGFLAGS_BILEV_BIT) != 0) +#define IMGFLAGS_ISGREY(f) \ + (((f) & IMGFLAGS_GREY_BIT) != 0) +#define IMGFLAGS_ISGREY4(f) \ + (((f) & (IMGFLAGS_GREY_BIT|IMGFLAGS_GREY8_BIT)) == IMGFLAGS_GREY_BIT) +#define IMGFLAGS_ISGREY8(f) \ + (((f) & (IMGFLAGS_GREY_BIT|IMGFLAGS_GREY8_BIT)) == (IMGFLAGS_GREY_BIT|IMGFLAGS_GREY8_BIT)) +#define IMGFLAGS_ISRGB(f) \ + (((f) & IMGFLAGS_FMT_RGB24) != 0) /**************************************************************************** * Public Types @@ -88,7 +112,7 @@ extern "C" { * ****************************************************************************/ -EXTERN int tiff_write(int fd, FAR void *buffer, size_t count); +EXTERN int tiff_write(int fd, FAR const void *buffer, size_t count); #undef EXTERN #if defined(__cplusplus) |