Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!jvc!jonathan From: jonathan@jvc.UUCP (Jonathan Hue) Newsgroups: comp.graphics Subject: Re: Image Conversion 8bits to 1 Summary: bug fix (already, sigh...) Message-ID: <314@jvc.UUCP> Date: 17 Feb 89 00:35:37 GMT References: <1747@quanta.eng.ohio-state.edu> <313@jvc.UUCP> Organization: JVC Laboratory of America Lines: 29 I screwed up. A lot of raster file loaders pay attention to ras_maplength even when ras_maptype is RMT_NONE. It should always be 0 for these 1-bit images, so here's a patch. The program as distributed uses the maplength of the original. The bug only shows up when your original has a colormap. Sorry for the inconvenience. *** bw.dist Thu Feb 16 16:19:40 1989 --- bw.c Thu Feb 16 16:24:52 1989 *************** *** 90,96 **** outheader.ras_type = RT_STANDARD; outheader.ras_maptype = RMT_NONE; outheader.ras_length = outlinebytes * outheader.ras_height; ! pr_dump_header(stdout, &outheader, (colormap_t *) NULL); --- 90,96 ---- outheader.ras_type = RT_STANDARD; outheader.ras_maptype = RMT_NONE; outheader.ras_length = outlinebytes * outheader.ras_height; ! outheader.ras_maplength = 0; /* no color map */ pr_dump_header(stdout, &outheader, (colormap_t *) NULL); -Jonathan uunet!jvc!jonathan