Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.PackedImageData


        }
    }

    private void byteLoop2x2(Raster source, WritableRaster dest, Rectangle  destRect) {
        PixelAccessor pa = new PixelAccessor(source.getSampleModel(), null);
  PackedImageData pid =
            pa.getPackedPixels(source, source.getBounds(), false, false);
  byte[] sourceData   = pid.data;
        int sourceDBOffset  = pid.offset;
  int dx  = destRect.x;        int dy  = destRect.y;
  int dwi = destRect.width;    int dhi = destRect.height;
View Full Code Here


  // or through a lookup table for byte case

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_BYTE, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

  // or through a lookup table for byte case

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_SHORT, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

  // or through a lookup table for byte case

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_USHORT, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

  // int thresholdI = (int)Math.ceil(this.threshold);

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_INT, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

        Rectangle destRect){

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_FLOAT, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

        Rectangle destRect){

  Rectangle srcRect = mapDestRect(destRect,0); // should be identical to destRect

        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;
        PixelAccessor   srcPa  = new PixelAccessor(source.getSampleModel(), null);

        UnpackedImageData srcImD = srcPa.getPixels(source, srcRect, DataBuffer.TYPE_DOUBLE, false);
  int srcOffset  = srcImD.bandOffsets[0];
View Full Code Here

    // set all bits in a rectangular region to be 1
    // need to be sure that paddings not changing
    private void setTo1(Raster dest, Rectangle destRect){
        initBitsOn();
        PixelAccessor   pa  = new PixelAccessor(dest.getSampleModel(), null);
        PackedImageData pid = pa.getPackedPixels(dest, destRect, true, false);
  int offset = pid.offset;

  for(int h = 0; h < destRect.height; h++){
     int ind0 = pid.bitOffset;
     int indE = ind0 + destRect.width - 1;
View Full Code Here

        }
    }

    private void byteLoop(Raster source, WritableRaster dest, Rectangle  destRect){
        PixelAccessor pa = new PixelAccessor(source.getSampleModel(), null);
  PackedImageData pid =
            pa.getPackedPixels(source, source.getBounds(), false, false);
  byte[] sourceData   = pid.data;
        int sourceDBOffset  = pid.offset;
  int dx  = destRect.x;
  int dy  = destRect.y;
View Full Code Here

    // speed up for the case of 4x4
    // and data buffer bitOffset is 0 or 4
    private void byteLoop4x4(Raster source, WritableRaster dest, Rectangle  destRect) {
        PixelAccessor pa = new PixelAccessor(source.getSampleModel(), null);
  PackedImageData pid =
            pa.getPackedPixels(source, source.getBounds(), false, false);

  if(pid.bitOffset % 4 !=0){
     // special treatment only for offsets 0 and 4
     byteLoop(source, dest, destRect);
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.PackedImageData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.