Skip to content

Commit ca5130f

Browse files
authored
psconvert: fix gs options passed via -C (#8983)
Fix #8982
1 parent a5f8a31 commit ca5130f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/psconvert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ EXTERN_MSC int GMT_psconvert(void *V_API, int mode, void *args) {
18151815

18161816
gs_BB = "-q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill"; /* -r defaults to 4000, see http://pages.cs.wisc.edu/~ghost/doc/cvs/Devices.htm#Test */
18171817

1818-
add_to_list (Ctrl->C.arg, "-dMaxBitmap=2147483647"); /* Add this as GS option to fix bug in GS */
1818+
if (!strstr(Ctrl->C.arg, "-dMaxBitmap")) add_to_list(Ctrl->C.arg, "-dMaxBitmap=2147483647"); /* Add this as GS option to fix bug in GS */
18191819

18201820
if (Ctrl->W.kml && !(Ctrl->T.device == GS_DEV_JPG ||
18211821
Ctrl->T.device == GS_DEV_JPGG || Ctrl->T.device == GS_DEV_TIF ||
@@ -1910,7 +1910,7 @@ EXTERN_MSC int GMT_psconvert(void *V_API, int mode, void *args) {
19101910

19111911
/* Let gray 50 be rasterized as 50/50/50. See http://gmtrac.soest.hawaii.edu/issues/50 */
19121912
if (!Ctrl->N.use_ICC_profiles && ((gsVersion.major == 9 && gsVersion.minor >= 5) || gsVersion.major > 9))
1913-
add_to_list (Ctrl->C.arg, "-dUseFastColor=true");
1913+
if (!strstr(Ctrl->C.arg, "-dUseFastColor")) add_to_list(Ctrl->C.arg, "-dUseFastColor=true"); /* Add only if not already there */
19141914

19151915
/* --------------------------------------------------------------------------------------------- */
19161916
/* ------ If a multi-page PDF file creation is requested, do it and exit. ------------------*/

0 commit comments

Comments
 (0)