src/share/classes/java/awt/image/ComponentColorModel.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2003, 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, 2014, 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
*** 1512,1528 **** } else { intpixel[0] = (int) (red * factor * ((1<<nBits[0]) - 1) + 0.5f); } if (nBits[1] == precision) { ! intpixel[1] = (int)(grn); } else { intpixel[1] = (int) (grn * factor * ((1<<nBits[1]) - 1) + 0.5f); } if (nBits[2] == precision) { ! intpixel[2] = (int)(blu); } else { intpixel[2] = (int) (blu * factor * ((1<<nBits[2]) - 1) + 0.5f); } } else if (is_LinearGray_stdScale) { --- 1512,1528 ---- } else { intpixel[0] = (int) (red * factor * ((1<<nBits[0]) - 1) + 0.5f); } if (nBits[1] == precision) { ! intpixel[1] = grn; } else { intpixel[1] = (int) (grn * factor * ((1<<nBits[1]) - 1) + 0.5f); } if (nBits[2] == precision) { ! intpixel[2] = blu; } else { intpixel[2] = (int) (blu * factor * ((1<<nBits[2]) - 1) + 0.5f); } } else if (is_LinearGray_stdScale) {