src/java.desktop/share/classes/java/awt/image/ColorModel.java
Print this page
*** 629,639 ****
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>tranferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getRed(Object inData) {
int pixel=0,length=0;
switch (transferType) {
--- 629,639 ----
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>transferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getRed(Object inData) {
int pixel=0,length=0;
switch (transferType) {
*** 696,706 ****
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>tranferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getGreen(Object inData) {
int pixel=0,length=0;
switch (transferType) {
--- 696,706 ----
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>transferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getGreen(Object inData) {
int pixel=0,length=0;
switch (transferType) {
*** 763,773 ****
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>tranferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getBlue(Object inData) {
int pixel=0,length=0;
switch (transferType) {
--- 763,773 ----
* is not a primitive array of type <code>transferType</code>
* @throws ArrayIndexOutOfBoundsException if
* <code>inData</code> is not large enough to hold a pixel value
* for this <code>ColorModel</code>
* @throws UnsupportedOperationException if this
! * <code>transferType</code> is not supported by this
* <code>ColorModel</code>
*/
public int getBlue(Object inData) {
int pixel=0,length=0;
switch (transferType) {
*** 1720,1730 ****
float input, output;
// algorithm for linear RGB to nonlinear sRGB conversion
// is from the IEC 61966-2-1 International Standard,
// Colour Management - Default RGB colour space - sRGB,
// First Edition, 1999-10,
! // avaiable for order at http://www.iec.ch
for (int i = 0; i <= 255; i++) {
input = ((float) i) / 255.0f;
if (input <= 0.0031308f) {
output = input * 12.92f;
} else {
--- 1720,1730 ----
float input, output;
// algorithm for linear RGB to nonlinear sRGB conversion
// is from the IEC 61966-2-1 International Standard,
// Colour Management - Default RGB colour space - sRGB,
// First Edition, 1999-10,
! // available for order at http://www.iec.ch
for (int i = 0; i <= 255; i++) {
input = ((float) i) / 255.0f;
if (input <= 0.0031308f) {
output = input * 12.92f;
} else {