< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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) 1997, 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
*** 125,135 **** this.model = model; } private void convertToRGB() { int size = width * height; ! int newpixels[] = new int[size]; if (bytePixels != null) { for (int i = 0; i < size; i++) { newpixels[i] = this.model.getRGB(bytePixels[i] & 0xff); } } else if (intPixels != null) { --- 125,135 ---- this.model = model; } private void convertToRGB() { int size = width * height; ! int[] newpixels = new int[size]; if (bytePixels != null) { for (int i = 0; i < size; i++) { newpixels[i] = this.model.getRGB(bytePixels[i] & 0xff); } } else if (intPixels != null) {
*** 157,167 **** * zero. * @see ImageConsumer#setPixels(int, int, int, int, ColorModel, byte[], int, int) */ public void setPixels(int x, int y, int w, int h, ! ColorModel model, byte pixels[], int off, int scansize) { // Fix 4184230 if (w < 0 || h < 0) { throw new IllegalArgumentException("Width ("+w+ ") and height ("+h+ --- 157,167 ---- * zero. * @see ImageConsumer#setPixels(int, int, int, int, ColorModel, byte[], int, int) */ public void setPixels(int x, int y, int w, int h, ! ColorModel model, byte[] pixels, int off, int scansize) { // Fix 4184230 if (w < 0 || h < 0) { throw new IllegalArgumentException("Width ("+w+ ") and height ("+h+
*** 244,254 **** * zero. * @see ImageConsumer#setPixels(int, int, int, int, ColorModel, int[], int, int) */ public void setPixels(int x, int y, int w, int h, ! ColorModel model, int pixels[], int off, int scansize) { // Fix 4184230 if (w < 0 || h < 0) { throw new IllegalArgumentException("Width ("+w+ ") and height ("+h+ --- 244,254 ---- * zero. * @see ImageConsumer#setPixels(int, int, int, int, ColorModel, int[], int, int) */ public void setPixels(int x, int y, int w, int h, ! ColorModel model, int[] pixels, int off, int scansize) { // Fix 4184230 if (w < 0 || h < 0) { throw new IllegalArgumentException("Width ("+w+ ") and height ("+h+
< prev index next >