[GRASSLIST:17] Re: d.rgb still crashes...
Glynn Clements
glynn.clements at virgin.net
Wed May 14 20:12:36 EDT 2003
Jeff D. Hamann wrote:
> I've just installed the cygwin grass5.0.2 from the download site and tried
> to display a composite image using d.rgb and the display window still
> crashes when I try to run the command. Since I've never tried to fix someone
> else's GRASS code, how should I go about getting this fixed?
My original fix was incorrect; I have an updated fix (patch attached,
against 5.0.2, but that doesn't help if you don't have the source
code).
I've CC'd this to the wingrass list in the hope that someone is
willing to provide an updated libG11.dll binary.
--
Glynn Clements <glynn.clements at virgin.net>
-------------- next part --------------
--- src/display/devices/windows/libW11/w32/xlib.c~ Sat Jan 11 23:20:35 2003
+++ src/display/devices/windows/libW11/w32/xlib.c Thu May 15 01:06:26 2003
@@ -1821,13 +1821,13 @@
XImage *img = (XImage *) allocateMemory ( sizeof ( XImage ) );
NT_debug ("XCreateImage\n");
if (img) {
-#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3))
+#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * (pad))
if (bytes_per_line == 0)
{
if (format == ZPixmap)
- bytes_per_line = ROUNDUP(depth * width, bitmap_pad);
+ bytes_per_line = ROUNDUP(depth * width, bitmap_pad>>3);
else
- bytes_per_line = ROUNDUP(width + offset, bitmap_pad);
+ bytes_per_line = ROUNDUP(width + offset, bitmap_pad>>3);
}
img->depth = depth;
More information about the grass-user
mailing list