public ColorTable GetRasterColorTable() { long cPtr = gdalJNI.Band_GetRasterColorTable(swigCPtr, this); ColorTable ret = null; if (cPtr != 0) { ret = new ColorTable(cPtr, false); ret.addReference(this); } return ret; }
@Override protected void finalize() { delete(); }
public Object clone() { return Clone(); }
try { ct = rband.GetRasterColorTable(); IndexColorModel icm = ct.getIndexColorModel(gdal.GetDataTypeSize(buf_type)); setColorModel(icm); } finally { try{ ct.delete(); }catch (Throwable e) { if(LOGGER.isLoggable(Level.FINEST))
public int SetColorTable(final ColorTable arg) { return gdalJNI.Band_SetColorTable(this.swigCPtr, this, ColorTable.getCPtr(arg), arg); }
BufferedImage image = null; if (this.band.GetRasterColorInterpretation() == gdalconstConstants.GCI_PaletteIndex) { ColorModel cm = this.band.GetRasterColorTable().getIndexColorModel(gdal.GetDataTypeSize(gdalBufferDataType)); image = new BufferedImage(cm, writableRaster, false, null); } else if (imageDataBuffer instanceof DataBufferByte || imageDataBuffer instanceof DataBufferUShort) {
public IndexColorModel getIndexColorModel(int bits) { int size = GetCount(); byte[] reds = new byte[size]; byte[] greens = new byte[size]; entry = GetColorEntry(i); reds[i] = (byte)(entry.getRed()&0xff); greens[i] = (byte)(entry.getGreen()&0xff);
ColorTable ct = new ColorTable( gdalconstConstants.GPI_RGB); int j = 0; for (; j < size; j++) ct.SetColorEntry(j, new Color(icm.getRGB(j))); band.SetRasterColorTable(ct);
public ColorTable Clone() { final long cPtr = gdalJNI.ColorTable_Clone(this.swigCPtr, this); return cPtr == 0 ? null : new ColorTable(cPtr, true); }
try { ct = rband.GetRasterColorTable(); IndexColorModel icm = ct.getIndexColorModel(gdal.GetDataTypeSize(buf_type)); setColorModel(icm); } finally { try{ ct.delete(); }catch (Throwable e) { if(LOGGER.isLoggable(Level.FINEST))
public int SetRasterColorTable(final ColorTable arg) { return gdalJNI.Band_SetRasterColorTable(this.swigCPtr, this, ColorTable.getCPtr(arg), arg); }
if ( BufferedImage.TYPE_BYTE_INDEXED == dataType ) { ColorTable ct = band.GetRasterColorTable(); IndexColorModel cm = ct.getIndexColorModel( gdal.GetDataTypeSize( bufType ) ); img = new BufferedImage( xSize, ySize, dataType, cm ); } else {
public IndexColorModel getIndexColorModel(final int bits) { final int size = GetCount(); final byte[] reds = new byte[size]; final byte[] greens = new byte[size]; entry = GetColorEntry(i); reds[i] = (byte)(entry.getRed() & 0xff); greens[i] = (byte)(entry.getGreen() & 0xff);
ColorTable ct = new ColorTable( gdalconstConstants.GPI_RGB); int j = 0; for (; j < size; j++) ct.SetColorEntry(j, new Color(icm.getRGB(j))); band.SetRasterColorTable(ct);
public ColorTable Clone() { long cPtr = gdalJNI.ColorTable_Clone(swigCPtr, this); return (cPtr == 0) ? null : new ColorTable(cPtr, true); }
public ColorTable GetColorTable() { final long cPtr = gdalJNI.Band_GetColorTable(this.swigCPtr, this); ColorTable ret = null; if (cPtr != 0) { ret = new ColorTable(cPtr, false); ret.addReference(this); } return ret; }
public int SetRasterColorTable(ColorTable arg) { return gdalJNI.Band_SetRasterColorTable(swigCPtr, this, ColorTable.getCPtr(arg), arg); }
colorModel = rasterColorTable.getIndexColorModel(gdal.GetDataTypeSize(bandDataType)); image = new BufferedImage(colorModel, raster, false, null); } else {
protected void finalize() { delete(); }
@Override public Object clone() { return Clone(); }