Package java.awt.image

Examples of java.awt.image.PixelInterleavedSampleModel


                    bandOffsets[i] = i;
                }

                if (bitsPerSample[0] == 8) {

                    sampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, tileWidth, tileHeight, bands, bands
                            * tileWidth, bandOffsets);
                    colorModel = null;

                } else if (bitsPerSample[0] == 16) {

                    sampleModel = new PixelInterleavedSampleModel(dataType, tileWidth, tileHeight, bands, bands
                            * tileWidth, bandOffsets);
                    colorModel = null;
                }
            }

View Full Code Here


        int dataType = dataBuffer.getDataType();

        switch(dataType) {
        case DataBuffer.TYPE_BYTE:
        case DataBuffer.TYPE_USHORT:
            PixelInterleavedSampleModel csm =
                new PixelInterleavedSampleModel(dataType, width, height,
                                                pixelStride,
                                                scanlineStride,
                                                bandOffsets);
            return Raster.createWritableRaster(csm,dataBuffer,location);
View Full Code Here

        }

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
        case DataBuffer.TYPE_USHORT:
            return new PixelInterleavedSampleModel(dataType,
                                                   width, height,
                                                   pixelStride,
                                                   scanlineStride,
                                                   bandOffsets);
        case DataBuffer.TYPE_INT:
View Full Code Here

        int[] bitsPerSample = new int[1];
        bitsPerSample[0] = bits;

        sampleModel =
            new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
                                            width, height,
                                            1, width,
                                            new int[] {0});

        if (!transparentColorFlag) {
View Full Code Here

        int sourceTransX = pid.rect.x;   // source.getSampleModelTranslateX();
        int sourceTransY = pid.rect.y;   // source.getSampleModelTranslateY();
        int sourceDataBitOffset  = pid.bitOffset;
        int sourceScanlineStride = pid.lineStride;

        PixelInterleavedSampleModel destSM =
            (PixelInterleavedSampleModel)dest.getSampleModel();
        DataBufferByte destDB =
            (DataBufferByte)dest.getDataBuffer();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destScanlineStride = destSM.getScanlineStride();

        byte[] destData  = destDB.getData();
        int destDBOffset = destDB.getOffset();

  int[] sAreaBitsOn = new int[4];
View Full Code Here

        // in the J2SE is a DirectColorModel which is by definition of
        // ColorSpace.TYPE_RGB. Therefore if there are fewer than 3 bands
        // a data copy is obligatory if a ColorModel will be possible.
        SampleModel sm = null;
        if(sourceSM instanceof SinglePixelPackedSampleModel && numBands < 3) {
            sm = new PixelInterleavedSampleModel(
                     DataBuffer.TYPE_BYTE,
                     sourceSM.getWidth(), sourceSM.getHeight(),
                     numBands, sourceSM.getWidth()*numBands,
                     numBands == 1 ? new int[] {0} : new int[] {0, 1});
        } else {
View Full Code Here

      !(sm instanceof PixelInterleavedSampleModel  ||
        sm instanceof SinglePixelPackedSampleModel &&
              sm.getNumBands()==1)){

      // Width and height will be corrected in OpImage.layoutHelper
            sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
             1,
             1,
             1,
             1,
             new int[] {0});
View Full Code Here

  int dwi = destRect.width;
  int dhi = destRect.height;
        int sourceTransX = pid.rect.x;   // source.getSampleModelTranslateX();
        int sourceTransY = pid.rect.y;   // source.getSampleModelTranslateY();

        PixelInterleavedSampleModel destSM =
            (PixelInterleavedSampleModel)dest.getSampleModel();
        DataBufferByte destDB =
            (DataBufferByte)dest.getDataBuffer();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destScanlineStride = destSM.getScanlineStride();

        byte[] destData  = destDB.getData();
        int destDBOffset = destDB.getOffset();

        int[] sbytenum = new int[dwi];
View Full Code Here

        int sourceTransX = pid.rect.x;   // source.getSampleModelTranslateX();
        int sourceTransY = pid.rect.y;   // source.getSampleModelTranslateY();
        int sourceDataBitOffset  = pid.bitOffset;
        int sourceScanlineStride = pid.lineStride;

        PixelInterleavedSampleModel destSM =
            (PixelInterleavedSampleModel)dest.getSampleModel();
        DataBufferByte destDB =
            (DataBufferByte)dest.getDataBuffer();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destScanlineStride = destSM.getScanlineStride();

        byte[] destData  = destDB.getData();
        int destDBOffset = destDB.getOffset();

  int[] sAreaBitsOn = new int[2];
View Full Code Here

        int sourceTransX = pid.rect.x;   // source.getSampleModelTranslateX();
        int sourceTransY = pid.rect.y;   // source.getSampleModelTranslateY();
        int sourceDataBitOffset  = pid.bitOffset;
        int sourceScanlineStride = pid.lineStride;

        PixelInterleavedSampleModel destSM =
            (PixelInterleavedSampleModel)dest.getSampleModel();
        DataBufferByte destDB =
            (DataBufferByte)dest.getDataBuffer();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destScanlineStride = destSM.getScanlineStride();

        byte[] destData  = destDB.getData();
        int destDBOffset = destDB.getOffset();

        int[] sbytenum = new int[dwi];
View Full Code Here

TOP

Related Classes of java.awt.image.PixelInterleavedSampleModel

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.