Malvar-He-Cutler Linear Image Demosaicking

imageio.h

Go to the documentation of this file.
00001 
00016 #ifndef _IMAGEIO_H_
00017 #define _IMAGEIO_H_
00018 
00019 #include <stdio.h>
00020 #include "basic.h"
00021 
00023 #define MAX_IMAGE_SIZE 10000
00024 
00025 /* Build string macros listing the supported formats */
00026 #ifdef LIBJPEG_SUPPORT
00027 #define SUPPORTEDSTRING_JPEG    "/JPEG"
00028 #else
00029 #define SUPPORTEDSTRING_JPEG    ""
00030 #endif
00031 #ifdef LIBPNG_SUPPORT
00032 #define SUPPORTEDSTRING_PNG             "/PNG"
00033 #else
00034 #define SUPPORTEDSTRING_PNG             ""
00035 #endif
00036 #ifdef LIBTIFF_SUPPORT
00037 #define SUPPORTEDSTRING_TIFF    "/TIFF"
00038 #else
00039 #define SUPPORTEDSTRING_TIFF    ""
00040 #endif
00041 
00047 #define READIMAGE_FORMATS_SUPPORTED     \
00048     "BMP" SUPPORTEDSTRING_JPEG SUPPORTEDSTRING_PNG SUPPORTEDSTRING_TIFF
00049     
00051 #define WRITEIMAGE_FORMATS_SUPPORTED    \
00052     "BMP" SUPPORTEDSTRING_JPEG SUPPORTEDSTRING_PNG SUPPORTEDSTRING_TIFF
00053 
00054 
00055 /* Definitions for specifying image formats */
00056 #define IMAGEIO_U8            0x0000
00057 #define IMAGEIO_SINGLE        0x0001
00058 #define IMAGEIO_FLOAT         IMAGEIO_SINGLE
00059 #define IMAGEIO_DOUBLE        0x0002
00060 #define IMAGEIO_STRIP_ALPHA   0x0010
00061 #define IMAGEIO_BGRFLIP       0x0020
00062 #define IMAGEIO_AFLIP         0x0040
00063 #define IMAGEIO_GRAYSCALE     0x0080
00064 #define IMAGEIO_PLANAR        0x0100
00065 #define IMAGEIO_COLUMNMAJOR   0x0200
00066 #define IMAGEIO_RGB           (IMAGEIO_STRIP_ALPHA)
00067 #define IMAGEIO_BGR           (IMAGEIO_STRIP_ALPHA | IMAGEIO_BGRFLIP)
00068 #define IMAGEIO_RGBA          0x0000
00069 #define IMAGEIO_BGRA          (IMAGEIO_BGRFLIP)
00070 #define IMAGEIO_ARGB          (IMAGEIO_AFLIP)
00071 #define IMAGEIO_ABGR          (IMAGEIO_BGRFLIP | IMAGEIO_AFLIP)
00072 
00073 #ifndef _CRT_SECURE_NO_WARNINGS
00074 
00075 #define _CRT_SECURE_NO_WARNINGS
00076 #endif
00077 
00078 int IdentifyImageType(char *Type, const char *FileName);
00079 
00080 void *ReadImage(int *Width, int *Height, 
00081     const char *FileName, unsigned Format);
00082 
00083 int WriteImage(void *Image, int Width, int Height, 
00084     const char *FileName, unsigned Format, int Quality);
00085     
00086 #endif /* _IMAGEIO_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines