diff options
-rw-r--r-- | Build/source/texk/dvipdfm-x/bmpimage.c | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/bmpimage.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/bmpimage.c b/Build/source/texk/dvipdfm-x/bmpimage.c index 317c5b514e9..5e3297713d7 100644 --- a/Build/source/texk/dvipdfm-x/bmpimage.c +++ b/Build/source/texk/dvipdfm-x/bmpimage.c @@ -39,12 +39,14 @@ #define DIB_FILE_HEADER_SIZE 14 #define DIB_CORE_HEADER_SIZE 14 #define DIB_INFO_HEADER_SIZE 40 +#define DIB_INFO_HEADER_SIZE4 108 +#define DIB_INFO_HEADER_SIZE5 124 #define DIB_COMPRESS_NONE 0 #define DIB_COMPRESS_RLE8 1 #define DIB_COMPRESS_RLE4 2 -#define DIB_HEADER_SIZE_MAX (DIB_FILE_HEADER_SIZE+DIB_INFO_HEADER_SIZE) +#define DIB_HEADER_SIZE_MAX (DIB_FILE_HEADER_SIZE+DIB_INFO_HEADER_SIZE5) static long read_raster_rle8 (unsigned char *data_ptr, long width, long height, FILE *fp); @@ -130,7 +132,9 @@ bmp_include_image (pdf_ximage *ximage, FILE *fp) bit_count = USHORT_LE(p); p += 2; compression = DIB_COMPRESS_NONE; psize = 3; - } else if (hsize == DIB_INFO_HEADER_SIZE) { + } else if (hsize == DIB_INFO_HEADER_SIZE || + hsize == DIB_INFO_HEADER_SIZE4 || + hsize == DIB_INFO_HEADER_SIZE5) { info.width = ULONG_LE(p); p += 4; info.height = ULONG_LE(p); p += 4; if (USHORT_LE(p) != 1) { diff --git a/Build/source/texk/web2c/xetexdir/image/bmpimage.c b/Build/source/texk/web2c/xetexdir/image/bmpimage.c index 97793fc22e9..90355198caf 100644 --- a/Build/source/texk/web2c/xetexdir/image/bmpimage.c +++ b/Build/source/texk/web2c/xetexdir/image/bmpimage.c @@ -59,12 +59,14 @@ #define DIB_FILE_HEADER_SIZE 14 #define DIB_CORE_HEADER_SIZE 14 #define DIB_INFO_HEADER_SIZE 40 +#define DIB_INFO_HEADER_SIZE4 108 +#define DIB_INFO_HEADER_SIZE5 124 #define DIB_COMPRESS_NONE 0 #define DIB_COMPRESS_RLE8 1 #define DIB_COMPRESS_RLE4 2 -#define DIB_HEADER_SIZE_MAX (DIB_FILE_HEADER_SIZE+DIB_INFO_HEADER_SIZE) +#define DIB_HEADER_SIZE_MAX (DIB_FILE_HEADER_SIZE+DIB_INFO_HEADER_SIZE5) static void WARN(const char *fmt, ...) @@ -152,7 +154,9 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) bit_count = USHORT_LE(p); p += 2; compression = DIB_COMPRESS_NONE; psize = 3; - } else if (hsize == DIB_INFO_HEADER_SIZE) { + } else if (hsize == DIB_INFO_HEADER_SIZE || + hsize == DIB_INFO_HEADER_SIZE4 || + hsize == DIB_INFO_HEADER_SIZE5) { info->width = ULONG_LE(p); p += 4; info->height = ULONG_LE(p); p += 4; if (USHORT_LE(p) != 1) { |