Revision 3585 trunk/libraries/libjni-gdal/src/rasterband_interfaz.c
rasterband_interfaz.c | ||
---|---|---|
149 | 149 |
// min |
150 | 150 |
/******************************************************************************/ |
151 | 151 |
|
152 |
int min(int x, int y){ |
|
152 |
/*int min(int x, int y){
|
|
153 | 153 |
if(x < y) |
154 | 154 |
return x; |
155 | 155 |
else |
156 | 156 |
return y; |
157 |
} |
|
157 |
}*/
|
|
158 | 158 |
|
159 | 159 |
/******************************************************************************/ |
160 | 160 |
// ReadRaster |
... | ... | |
382 | 382 |
hTable = GDALGetRasterColorTable( rb ); |
383 | 383 |
|
384 | 384 |
if( hTable != NULL ){ |
385 |
for( i = 0; i < min(256,GDALGetColorEntryCount( hTable )); i++ ){ |
|
385 |
int min = GDALGetColorEntryCount( hTable ); |
|
386 |
if(256 < min) |
|
387 |
min = 256; |
|
388 |
for( i = 0; i < min; i++ ){ |
|
386 | 389 |
GDALColorEntry sEntry; |
387 | 390 |
|
388 | 391 |
GDALGetColorEntryAsRGB( hTable, i, &sEntry ); |
Also available in: Unified diff