< prev index next >

src/java.desktop/share/classes/java/awt/image/PixelInterleavedSampleModel.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 81,91 **** */ public PixelInterleavedSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride, ! int bandOffsets[]) { super(dataType, w, h, pixelStride, scanlineStride, bandOffsets); int minBandOff=this.bandOffsets[0]; int maxBandOff=this.bandOffsets[0]; for (int i=1; i<this.bandOffsets.length; i++) { minBandOff = Math.min(minBandOff,this.bandOffsets[i]); --- 81,91 ---- */ public PixelInterleavedSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride, ! int[] bandOffsets) { super(dataType, w, h, pixelStride, scanlineStride, bandOffsets); int minBandOff=this.bandOffsets[0]; int maxBandOff=this.bandOffsets[0]; for (int i=1; i<this.bandOffsets.length; i++) { minBandOff = Math.min(minBandOff,this.bandOffsets[i]);
*** 152,163 **** * existing PixelInterleavedSampleModel can be used with. The new * PixelInterleavedSampleModel/DataBuffer combination will represent * an image with a subset of the bands of the original * PixelInterleavedSampleModel/DataBuffer combination. */ ! public SampleModel createSubsetSampleModel(int bands[]) { ! int newBandOffsets[] = new int[bands.length]; for (int i=0; i<bands.length; i++) { newBandOffsets[i] = bandOffsets[bands[i]]; } return new PixelInterleavedSampleModel(this.dataType, width, height, this.pixelStride, --- 152,163 ---- * existing PixelInterleavedSampleModel can be used with. The new * PixelInterleavedSampleModel/DataBuffer combination will represent * an image with a subset of the bands of the original * PixelInterleavedSampleModel/DataBuffer combination. */ ! public SampleModel createSubsetSampleModel(int[] bands) { ! int[] newBandOffsets = new int[bands.length]; for (int i=0; i<bands.length; i++) { newBandOffsets[i] = bandOffsets[bands[i]]; } return new PixelInterleavedSampleModel(this.dataType, width, height, this.pixelStride,
< prev index next >