Examples of BandedSampleModel


Examples of java.awt.image.BandedSampleModel

        // in-memory format of the image to a type that we know the
        // operator likes. This is not fool proof. It converts all images
        // into non-indexed representations that have a byte pixel width
        ImageLayout layout = new ImageLayout();
        layout.setSampleModel(
            new BandedSampleModel(DataBuffer.TYPE_BYTE,
                                  src.getWidth(),
                                  src.getHeight(),
                                  src.getColorModel().getNumColorComponents()));
        // set up the rendering hints object that is passed to the format
        // operation to effect this change.
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                                                     hasAlpha,
                                                     isAlphaPremultiplied);

            int w = 1;
            int h = 1;
            this.sampleModel = new BandedSampleModel(dataType,
                                                     w, h,
                                                     w,
                                                     bankIndices,
                                                     bandOffsets);
        }
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                                                     hasAlpha,
                                                     isAlphaPremultiplied);

            int w = 1;
            int h = 1;
            this.sampleModel = new BandedSampleModel(dataType,
                                                     w, h,
                                                     w,
                                                     bankIndices,
                                                     bandOffsets);
        }
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                                          int tileWidth,
                                          int tileHeight,
                                          int[] bankIndices,
                                          int[] bandOffsets) {
        SampleModel sm =
            new BandedSampleModel(dataType,
                                  tileWidth, tileHeight,
                                  tileWidth,
                                  bankIndices,
                                  bandOffsets);
        return new TiledImage(minX, minY, width, height,
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                "ushort DataBuffers");
        }
        DataBufferUShort dbus = (DataBufferUShort)dataBuffer;

        if (sampleModel instanceof BandedSampleModel) {
            BandedSampleModel bsm = (BandedSampleModel)sampleModel;
            this.scanlineStride = bsm.getScanlineStride();
            int bankIndices[] = bsm.getBankIndices();
            int bandOffsets[] = bsm.getBandOffsets();
            int dOffsets[] = dbus.getOffsets();
            dataOffsets = new int[bankIndices.length];
            data = new short[bankIndices.length][];
            int xOffset = aRegion.x - origin.x;
            int yOffset = aRegion.y - origin.y;
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                "byte DataBuffers");
        }
        DataBufferByte dbb = (DataBufferByte)dataBuffer;

        if (sampleModel instanceof BandedSampleModel) {
            BandedSampleModel bsm = (BandedSampleModel)sampleModel;
            this.scanlineStride = bsm.getScanlineStride();
            int bankIndices[] = bsm.getBankIndices();
            int bandOffsets[] = bsm.getBandOffsets();
            int dOffsets[] = dbb.getOffsets();
            dataOffsets = new int[bankIndices.length];
            data = new byte[bankIndices.length][];
            int xOffset = aRegion.x - origin.x;
            int yOffset = aRegion.y - origin.y;
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                                                     hasAlpha,
                                                     isAlphaPremultiplied);

            int w = 1;
            int h = 1;
            this.sampleModel = new BandedSampleModel(dataType,
                                                     w, h,
                                                     w,
                                                     bankIndices,
                                                     bandOffsets);
        }
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                                                        hasAlpha,
                                                        isAlphaPremultiplied,
                                                        transparency,
                                                        dataType);
       
        SampleModel sampleModel = new BandedSampleModel(dataType,
                                                        1,
                                                        1,
                                                        1,
                                                        bankIndices,
                                                        bandOffsets);
View Full Code Here

Examples of java.awt.image.BandedSampleModel

/*      */   }
/*      */
/*      */   /** @deprecated */
/*      */   public static TiledImage createBanded(int minX, int minY, int width, int height, int dataType, int tileWidth, int tileHeight, int[] bankIndices, int[] bandOffsets)
/*      */   {
/*  443 */     SampleModel sm = new BandedSampleModel(dataType, tileWidth, tileHeight, tileWidth, bankIndices, bandOffsets);
/*      */
/*  449 */     return new TiledImage(minX, minY, width, height, minX, minY, sm, PlanarImage.createColorModel(sm));
/*      */   }
View Full Code Here

Examples of java.awt.image.BandedSampleModel

                        false, // isAlphaPremultiplied,
                        Transparency.OPAQUE,
                        dataType);

        SampleModel sm = banded
                ? new BandedSampleModel(dataType, cols, rows, samples)
                : new PixelInterleavedSampleModel(dataType, cols, rows,
                        samples, cols * samples, bandOffsets());
        WritableRaster raster = Raster.createWritableRaster(sm, null);
        return new BufferedImage(cm, raster, false, null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.