From: Sandro Santilli Date: Wed, 31 May 2006 08:58:19 +0000 (+0000) Subject: Added support and info for CHIP.datatype 7,8,107 and 108. They were not documented... X-Git-Tag: pgis_1_1_3~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aaf294061d287bb9706931739ad1a654932e2d64;p=postgis Added support and info for CHIP.datatype 7,8,107 and 108. They were not documented but used by CHIP canonical input function. git-svn-id: http://svn.osgeo.org/postgis/trunk@2374 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/liblwgeom.h b/lwgeom/liblwgeom.h index 054d195da..fa7801a7a 100644 --- a/lwgeom/liblwgeom.h +++ b/lwgeom/liblwgeom.h @@ -81,9 +81,13 @@ typedef struct chiptag int datatype; /* 1 = float32, * 5 = 24bit integer, * 6 = 16bit integer (short) + * 7 = 16bit ??? + * 8 = 8bit ??? * 101 = float32 (NDR), * 105 = 24bit integer (NDR), - * 106=16bit int (NDR) + * 106 = 16bit int (NDR) + * 107 = 16bit ??? (NDR) + * 108 = 8bit ??? (NDR) */ int height; int width; diff --git a/lwgeom/lwgeom_chip.c b/lwgeom/lwgeom_chip.c index a3edef0b3..8ca70caf7 100644 --- a/lwgeom/lwgeom_chip.c +++ b/lwgeom/lwgeom_chip.c @@ -16,7 +16,7 @@ /* Define this to debug CHIP ops */ -/* #define DEBUG_CHIP 1 */ +#define DEBUG_CHIP 1 /* Internal funcs */ void swap_char(char *a,char *b); @@ -569,8 +569,13 @@ chip_pixel_value_size(int datatype) case 105: return 3; case 6: + case 7: case 106: + case 107: return 2; + case 8: + case 108: + return 1; default: lwerror("Unknown CHIP datatype: %d", datatype); return 0;