java.awt.image.Raster.createRaster()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中java.awt.image.Raster.createRaster方法的一些代码示例,展示了Raster.createRaster的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Raster.createRaster方法的具体详情如下:
包路径:java.awt.image.Raster
类名称:Raster
方法名:createRaster

Raster.createRaster介绍

暂无

代码示例

代码示例来源:origin: bcdev/beam

/**
 * Retrieves a tile.  Returns <code>null</code> if the tile is not
 * present in the cache.
 *
 * @param owner The <code>RenderedImage</code> that the tile belongs to.
 * @param tileX The X index of the tile in the owner's tile grid.
 * @param tileY The Y index of the tile in the owner's tile grid.
 */
public Raster getTile(RenderedImage owner, int tileX, int tileY) {
  TileId tileId = createTileId(owner, tileX, tileY);
  Raster tile = null;
  synchronized (this) {
    CachedTileImpl cachedTile = tileMap.get(tileId);
    if (cachedTile != null) {
      try {
        DataBuffer dataBuffer = readTileData(cachedTile.file, cachedTile.sampleModel);
        if (cachedTile.writable) {
          tile = Raster.createWritableRaster(cachedTile.sampleModel, dataBuffer, cachedTile.location);
        } else {
          tile = Raster.createRaster(cachedTile.sampleModel, dataBuffer, cachedTile.location);
        }
        cachedTile.tileTimeStamp = System.currentTimeMillis();
      } catch (IOException e) {
        // todo - log warning
      }
    }
  }
  return tile;
}

代码示例来源:origin: com.harium.etyl/etyl

public void createBuffer(byte[] imageData) {
  DataBufferByte dataBuffer = new DataBufferByte(imageData, imageData.length);
  originalBuffer.setData(Raster.createRaster(originalBuffer.getSampleModel(), dataBuffer, null));
  resetImage();
}

代码示例来源:origin: com.harium/etyl

public void createBuffer(byte[] imageData) {
  DataBufferByte dataBuffer = new DataBufferByte(imageData, imageData.length);
  originalBuffer.setData(Raster.createRaster(originalBuffer.getSampleModel(), dataBuffer, null));
  resetImage();
}

代码示例来源:origin: org.geotools/gt2-coverage

final Raster     raster = Raster.createRaster(sampleModel, buffer, origin);
pendings[tileIndice] = raster;
fireTileUpdate(tileX, tileY, true);

代码示例来源:origin: Geomatys/geotoolkit

final Raster     raster = Raster.createRaster(sampleModel, buffer, origin);
pendings[tileIndex] = raster;
fireTileUpdate(tileX, tileY, true);

代码示例来源:origin: com.googlecode.jaitools/jt-utils

raster = Raster.createWritableRaster(img.getSampleModel(), dataBuf, location);
} else {
  raster = Raster.createRaster(img.getSampleModel(), dataBuf, location);

代码示例来源:origin: com.applitools/eyes-common-java4

dstImage.setData(Raster.createRaster(dstImage.getSampleModel(), bufDst, null));
return dstImage;

代码示例来源:origin: com.applitools/eyes-common-java3

dstImage.setData(Raster.createRaster(dstImage.getSampleModel(), bufDst, null));
return dstImage;

代码示例来源:origin: net.imagej/imagej-ui-swing

Raster.createRaster(sm, db, new java.awt.Point(0, 0));
img.setData(raster);
figure.setBounds(new Rectangle2D.Double(minX, minY, w, h));

代码示例来源:origin: org.jaitools/jt-utils

raster = Raster.createWritableRaster(img.getSampleModel(), dataBuf, location);
} else {
  raster = Raster.createRaster(img.getSampleModel(), dataBuf, location);

相关文章