Package sun.awt.image

Examples of sun.awt.image.ByteInterleavedRaster


            }
        }

        public void doTransform(ByteInterleavedRaster input, ByteInterleavedRaster output) {
            if (cmsTransform != null) {
                ByteInterleavedRaster ri = normalizeRaster(input);
                ByteInterleavedRaster ro;
                int outBands = output.getNumBands();
                if (!input.getBounds().equals(output.getBounds())) {
                    int[] offsets = outBands == 1 ? new int[] {0} : new int[] {0, 1, 2};
                    SampleModel sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
                                                                     ri.getWidth(), ri.getHeight(),
                                                                     outBands, outBands * ri.getWidth(),
                                                                     offsets);
                    ro = new ByteInterleavedRaster(sm, new Point(ri.getMinX(), ri.getMinY()));
                } else
                    ro = normalizeRaster(output);
                int pixels = outBands == 1 ? ro.getDataStorage().length : ro.getDataStorage().length / outBands;
                cmsDoTransform(cmsTransform.handle, ri.getDataStorage(), ro.getDataStorage(), pixels);
                if (ro != output)
                    Functions.copyData(output, ro);
            }
        }
View Full Code Here


            IntegerInterleavedRaster iir = (IntegerInterleavedRaster) raster;
            if (iir.getNumDataElements() == 1 && iir.getPixelStride() == 1) {
                return new Int(iir, cm, xform, maxw, filter);
            }
        } else if (raster instanceof ByteInterleavedRaster) {
            ByteInterleavedRaster bir = (ByteInterleavedRaster) raster;
            if (bir.getNumDataElements() == 1 && bir.getPixelStride() == 1) {
                if (filter) {
                    if (isFilterableICM(cm)) {
                        return new ByteFilter(bir, cm, xform, maxw);
                    }
                } else {
View Full Code Here

            this.inOff = srcRas.getDataOffset(0);
        }

        public WritableRaster makeRaster(int w, int h) {
            WritableRaster ras = makeByteRaster(srcRas, w, h);
            ByteInterleavedRaster biRas = (ByteInterleavedRaster) ras;
            outData = biRas.getDataStorage();
            outSpan = biRas.getScanlineStride();
            outOff = biRas.getDataOffset(0);
            return ras;
        }
View Full Code Here

      IntegerInterleavedRaster iir = (IntegerInterleavedRaster) raster;
      if (iir.getNumDataElements() == 1 && iir.getPixelStride() == 1) {
    return new Int(iir, cm, xform, maxw, filter);
      }
  } else if (raster instanceof ByteInterleavedRaster) {
      ByteInterleavedRaster bir = (ByteInterleavedRaster) raster;
      if (bir.getNumDataElements() == 1 && bir.getPixelStride() == 1) {
    if (filter) {
        if (isFilterableICM(cm)) {
      return new ByteFilter(bir, cm, xform, maxw);
        }
    } else {
View Full Code Here

      this.inOff = srcRas.getDataOffset(0);
  }

  public WritableRaster makeRaster(int w, int h) {
      WritableRaster ras = makeByteRaster(srcRas, w, h);
      ByteInterleavedRaster biRas = (ByteInterleavedRaster) ras;
      outData = biRas.getDataStorage();
      outSpan = biRas.getScanlineStride();
      outOff = biRas.getDataOffset(0);
      return ras;
  }
View Full Code Here

            new SinglePixelPackedSampleModel(dataType, w, h, scanlineStride,
                                             bandMasks);

        switch(dataType) {
        case DataBuffer.TYPE_BYTE:
            return new ByteInterleavedRaster(sppsm, dataBuffer, location);

        case DataBuffer.TYPE_USHORT:
            return new ShortInterleavedRaster(sppsm, dataBuffer, location);

        case DataBuffer.TYPE_INT:
View Full Code Here

        int dataType = sm.getDataType();

        if (sm instanceof PixelInterleavedSampleModel) {
            switch(dataType) {
                case DataBuffer.TYPE_BYTE:
                    return new ByteInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_USHORT:
                    return new ShortInterleavedRaster(sm, db, location);
            }
        } else if (sm instanceof SinglePixelPackedSampleModel) {
            switch(dataType) {
                case DataBuffer.TYPE_BYTE:
                    return new ByteInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_USHORT:
                    return new ShortInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_INT:
View Full Code Here

        int dataType = sm.getDataType();

        if (sm instanceof PixelInterleavedSampleModel) {
            switch(dataType) {
                case DataBuffer.TYPE_BYTE:
                    return new ByteInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_USHORT:
                    return new ShortInterleavedRaster(sm, db, location);
            }
        } else if (sm instanceof SinglePixelPackedSampleModel) {
            switch(dataType) {
                case DataBuffer.TYPE_BYTE:
                    return new ByteInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_USHORT:
                    return new ShortInterleavedRaster(sm, db, location);

                case DataBuffer.TYPE_INT:
View Full Code Here

            IntegerInterleavedRaster iir = (IntegerInterleavedRaster) raster;
            if (iir.getNumDataElements() == 1 && iir.getPixelStride() == 1) {
                return new Int(iir, cm, xform, maxw, filter);
            }
        } else if (raster instanceof ByteInterleavedRaster) {
            ByteInterleavedRaster bir = (ByteInterleavedRaster) raster;
            if (bir.getNumDataElements() == 1 && bir.getPixelStride() == 1) {
                if (filter) {
                    if (isFilterableICM(cm)) {
                        return new ByteFilter(bir, cm, xform, maxw);
                    }
                } else {
View Full Code Here

            this.inOff = srcRas.getDataOffset(0);
        }

        public WritableRaster makeRaster(int w, int h) {
            WritableRaster ras = makeByteRaster(srcRas, w, h);
            ByteInterleavedRaster biRas = (ByteInterleavedRaster) ras;
            outData = biRas.getDataStorage();
            outSpan = biRas.getScanlineStride();
            outOff = biRas.getDataOffset(0);
            return ras;
        }
View Full Code Here

TOP

Related Classes of sun.awt.image.ByteInterleavedRaster

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.