From 14ebc2a9ea32def73c44d5502f4fbc701d5dee96 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 25 Jul 2015 04:19:27 +0000 Subject: dvipdfm-x: Improve output file size git-svn-id: svn://tug.org/texlive/trunk@37953 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/pdfximage.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Build/source/texk/dvipdfm-x/pdfximage.c') diff --git a/Build/source/texk/dvipdfm-x/pdfximage.c b/Build/source/texk/dvipdfm-x/pdfximage.c index 36368603f59..f4ad65db0e2 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.c +++ b/Build/source/texk/dvipdfm-x/pdfximage.c @@ -354,6 +354,8 @@ load_image (const char *ident, const char *fullname, int format, FILE *fp, #define dpx_fopen(n,m) (MFOPEN((n),(m))) #define dpx_fclose(f) (MFCLOSE((f))) +uint8_t PageBox_of_id[5000]; /* 5000 may be enough */ + int pdf_ximage_findresource (const char *ident, long page_no, pdf_obj *dict) { @@ -368,13 +370,13 @@ pdf_ximage_findresource (const char *ident, long page_no, pdf_obj *dict) I = &ic->ximages[id]; if (I->ident && !strcmp(ident, I->ident)) { f = I->filename; -/* - PageBox can be differrent. So we retry if ImageSpecial != 0 -*/ - if (ImageSpecial == 0) { - if (I->page_no == page_no + (page_no < 0 ? I->page_count+1 : 0) && - I->attr_dict == dict) { - return id; + if (I->page_no == page_no + (page_no < 0 ? I->page_count+1 : 0) && + I->attr_dict == dict) { + if (ImageSpecial) { + if ((int)PageBox_of_id[id] == PageBox) + return id; + } else { + return id; } } } -- cgit v1.2.3