diff -uNr GMT4.5.9_orig/src/pslib.c GMT4.5.9/src/pslib.c --- GMT4.5.9_orig/src/pslib.c 2012-12-19 05:45:55.000000000 +0900 +++ GMT4.5.9/src/pslib.c 2013-01-19 00:29:08.000000000 +0900 @@ -647,8 +647,11 @@ /* Colormask or interpolate */ it = nx < 0 ? 1 : (nbits < 0 ? 2 : 0); + /* if (PSL->internal.color_mode != PSL_GRAY && (image = ps_makecolormap (buffer, nx, ny, nbits))) { + */ /* Creation of colormap was successful */ + /* nbits = ps_bitreduce (image->buffer, nx, ny, image->colormap->ncolors); if (PSL->internal.comments) fprintf (PSL->internal.fp, "\n%% Start of %s Adobe Indexed %s image [%ld bit]\n", kind[PSL->internal.ascii], colorspace[id], nbits); @@ -658,13 +661,16 @@ ps_stream_dump (image->buffer, nx, ny, nbits, PSL->internal.compress, PSL->internal.ascii, 0); fprintf (PSL->internal.fp, "U\n"); if (PSL->internal.comments) fprintf (PSL->internal.fp, "%% End of %s Adobe Indexed %s image\n", kind[PSL->internal.ascii], colorspace[id]); + */ /* Clear the newly created image buffer and colormap */ + /* ps_free (image->buffer); ps_free (image->colormap); ps_free (image); } else { + */ /* Export full gray scale, RGB or CMYK image */ nbits = PSL_abs (nbits); @@ -686,7 +692,9 @@ ps_stream_dump (buffer, nx, ny, nbits, PSL->internal.compress, PSL->internal.ascii, 0); fprintf (PSL->internal.fp, "U\n"); if (PSL->internal.comments) fprintf (PSL->internal.fp, "%% End of %s Adobe %s image\n", kind[PSL->internal.ascii], colorspace[id]); + /* } + */ } /* fortran interface */