diff options
Diffstat (limited to 'rdppm.c')
-rw-r--r-- | rdppm.c | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -43,18 +43,8 @@ /* Macros to deal with unsigned chars as efficiently as compiler allows */ -#ifdef HAVE_UNSIGNED_CHAR typedef unsigned char U_CHAR; #define UCH(x) ((int)(x)) -#else /* !HAVE_UNSIGNED_CHAR */ -#ifdef __CHAR_UNSIGNED__ -typedef char U_CHAR; -#define UCH(x) ((int)(x)) -#else -typedef char U_CHAR; -#define UCH(x) ((int)(x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ #define ReadOK(file, buffer, len) \ @@ -659,11 +649,12 @@ start_input_ppm(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) if (maxval > 255) { source->pub.get_pixel_rows = get_word_rgb_row; } else if (maxval == MAXJSAMPLE && sizeof(JSAMPLE) == sizeof(U_CHAR) && - (cinfo->in_color_space == JCS_EXT_RGB #if RGB_RED == 0 && RGB_GREEN == 1 && RGB_BLUE == 2 && RGB_PIXELSIZE == 3 - || cinfo->in_color_space == JCS_RGB + (cinfo->in_color_space == JCS_EXT_RGB || + cinfo->in_color_space == JCS_RGB)) { +#else + cinfo->in_color_space == JCS_EXT_RGB) { #endif - )) { source->pub.get_pixel_rows = get_raw_row; use_raw_buffer = TRUE; need_rescale = FALSE; |