[GRASS5] NVIZ image dump broken?
Markus Neteler
neteler at itc.it
Wed May 3 16:50:45 EDT 2006
On Wed, May 03, 2006 at 09:40:42PM +0100, Glynn Clements wrote:
>
> Bob Covill wrote:
>
> > I took a look at the thread below and it appears that the image is being
> > read incorrectly on 64 bit machines. The image buffer is created from
> > gsd_getimage in gsd_prim.c in ogsf. Unfortunately, I am not an expert on
> > 64 bit machines, but I would guess that that either the malloc is wrong
> > or glReadPixels is wrong. Is an "unsigned long" a different size on 64
> > bit architecture?
>
> Very probably; I would expect long to be 64 bits on a 64-bit system.
>
> If you need a 32-bit type, either use uint32_t from <stdint.h> (C99,
> but present on most systems) or use AC_CHECK_SIZEOF in configure.in.
GDAL contains such tests:
dnl Check for 64 bit file API
AC_HAVE_LONG_LONG
AC_UNIX_STDIO_64
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
But I didn't check in detail.
Markus
More information about the grass-dev
mailing list