| OLD | NEW |
| 1 /* | 1 /* |
| 2 * jpeglib.h | 2 * jpeglib.h |
| 3 * | 3 * |
| 4 * Copyright (C) 1991-1998, Thomas G. Lane. | 4 * Copyright (C) 1991-1998, Thomas G. Lane. |
| 5 * Modified 2002-2009 by Guido Vollbeding. | 5 * Modified 2002-2009 by Guido Vollbeding. |
| 6 * Copyright (C) 2009-2010, D. R. Commander. | 6 * Copyright (C) 2009-2011, D. R. Commander. |
| 7 * This file is part of the Independent JPEG Group's software. | 7 * This file is part of the Independent JPEG Group's software. |
| 8 * For conditions of distribution and use, see the accompanying README file. | 8 * For conditions of distribution and use, see the accompanying README file. |
| 9 * | 9 * |
| 10 * This file defines the application interface for the JPEG library. | 10 * This file defines the application interface for the JPEG library. |
| 11 * Most applications using the library need only include this file, | 11 * Most applications using the library need only include this file, |
| 12 * and perhaps jerror.h if they want to know the exact error codes. | 12 * and perhaps jerror.h if they want to know the exact error codes. |
| 13 */ | 13 */ |
| 14 | 14 |
| 15 #ifndef JPEGLIB_H | 15 #ifndef JPEGLIB_H |
| 16 #define JPEGLIB_H | 16 #define JPEGLIB_H |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ | 208 UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ |
| 209 unsigned int original_length; /* # bytes of data in the file */ | 209 unsigned int original_length; /* # bytes of data in the file */ |
| 210 unsigned int data_length; /* # bytes of data saved at data[] */ | 210 unsigned int data_length; /* # bytes of data saved at data[] */ |
| 211 JOCTET FAR * data; /* the data contained in the marker */ | 211 JOCTET FAR * data; /* the data contained in the marker */ |
| 212 /* the marker length word is not counted in data_length or original_length */ | 212 /* the marker length word is not counted in data_length or original_length */ |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 /* Known color spaces. */ | 215 /* Known color spaces. */ |
| 216 | 216 |
| 217 #define JCS_EXTENSIONS 1 | 217 #define JCS_EXTENSIONS 1 |
| 218 #define JCS_ALPHA_EXTENSIONS 1 |
| 218 | 219 |
| 219 typedef enum { | 220 typedef enum { |
| 220 JCS_UNKNOWN, /* error/unspecified */ | 221 JCS_UNKNOWN, /* error/unspecified */ |
| 221 JCS_GRAYSCALE, /* monochrome */ | 222 JCS_GRAYSCALE, /* monochrome */ |
| 222 JCS_RGB, /* red/green/blue as specified by the RGB_RED, R
GB_GREEN, | 223 JCS_RGB, /* red/green/blue as specified by the RGB_RED, R
GB_GREEN, |
| 223 RGB_BLUE, and RGB_PIXELSIZE macros */ | 224 » » » » RGB_BLUE, and RGB_PIXELSIZE macros */ |
| 224 JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ | 225 JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ |
| 225 JCS_CMYK, /* C/M/Y/K */ | 226 JCS_CMYK, /* C/M/Y/K */ |
| 226 JCS_YCCK, /* Y/Cb/Cr/K */ | 227 JCS_YCCK, /* Y/Cb/Cr/K */ |
| 227 JCS_EXT_RGB, /* red/green/blue */ | 228 JCS_EXT_RGB, /* red/green/blue */ |
| 228 JCS_EXT_RGBX, /* red/green/blue/x */ | 229 JCS_EXT_RGBX, /* red/green/blue/x */ |
| 229 JCS_EXT_BGR, /* blue/green/red */ | 230 JCS_EXT_BGR, /* blue/green/red */ |
| 230 JCS_EXT_BGRX, /* blue/green/red/x */ | 231 JCS_EXT_BGRX, /* blue/green/red/x */ |
| 231 JCS_EXT_XBGR, /* x/blue/green/red */ | 232 JCS_EXT_XBGR, /* x/blue/green/red */ |
| 232 » JCS_EXT_XRGB» » /* x/red/green/blue */ | 233 » JCS_EXT_XRGB,» » /* x/red/green/blue */ |
| 234 » /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, |
| 235 » JCS_EXT_XBGR, or JCS_EXT_XRGB during decompression, the X byte is |
| 236 » undefined, and in order to ensure the best performance, |
| 237 » libjpeg-turbo can set that byte to whatever value it wishes. Use |
| 238 » the following colorspace constants to ensure that the X byte is set |
| 239 » to 0xFF, so that it can be interpreted as an opaque alpha |
| 240 » channel. */ |
| 241 » JCS_EXT_RGBA,» » /* red/green/blue/alpha */ |
| 242 » JCS_EXT_BGRA,» » /* blue/green/red/alpha */ |
| 243 » JCS_EXT_ABGR,» » /* alpha/blue/green/red */ |
| 244 » JCS_EXT_ARGB» » /* alpha/red/green/blue */ |
| 233 } J_COLOR_SPACE; | 245 } J_COLOR_SPACE; |
| 234 | 246 |
| 235 /* DCT/IDCT algorithm options. */ | 247 /* DCT/IDCT algorithm options. */ |
| 236 | 248 |
| 237 typedef enum { | 249 typedef enum { |
| 238 JDCT_ISLOW, /* slow but accurate integer algorithm */ | 250 JDCT_ISLOW, /* slow but accurate integer algorithm */ |
| 239 JDCT_IFAST, /* faster, less accurate integer method */ | 251 JDCT_IFAST, /* faster, less accurate integer method */ |
| 240 JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ | 252 JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ |
| 241 } J_DCT_METHOD; | 253 } J_DCT_METHOD; |
| 242 | 254 |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 #include "jerror.h" /* fetch error codes too */ | 1208 #include "jerror.h" /* fetch error codes too */ |
| 1197 #endif | 1209 #endif |
| 1198 | 1210 |
| 1199 #ifdef __cplusplus | 1211 #ifdef __cplusplus |
| 1200 #ifndef DONT_USE_EXTERN_C | 1212 #ifndef DONT_USE_EXTERN_C |
| 1201 } | 1213 } |
| 1202 #endif | 1214 #endif |
| 1203 #endif | 1215 #endif |
| 1204 | 1216 |
| 1205 #endif /* JPEGLIB_H */ | 1217 #endif /* JPEGLIB_H */ |
| OLD | NEW |