< prev index next >
src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -184,11 +184,11 @@
setComponentScaling();
}
}
int nc = this.getNumComponents();
- short tmp[] = new short[nc];
+ short[] tmp = new short[nc];
for (int i = 0; i < nc; i++) {
tmp[i] = (short)
((colorvalue[i] - minVal[i]) * invDiffMinMax[i] + 0.5f);
}
tmp = this2srgb.colorConvert(tmp, null);
@@ -235,11 +235,11 @@
if (needScaleInit) {
setComponentScaling();
}
}
- short tmp[] = new short[3];
+ short[] tmp = new short[3];
for (int i = 0; i < 3; i++) {
tmp[i] = (short) ((rgbvalue[i] * 65535.0f) + 0.5f);
}
tmp = srgb2this.colorConvert(tmp, null);
int nc = this.getNumComponents();
@@ -377,11 +377,11 @@
setComponentScaling();
}
}
int nc = this.getNumComponents();
- short tmp[] = new short[nc];
+ short[] tmp = new short[nc];
for (int i = 0; i < nc; i++) {
tmp[i] = (short)
((colorvalue[i] - minVal[i]) * invDiffMinMax[i] + 0.5f);
}
tmp = this2xyz.colorConvert(tmp, null);
@@ -520,11 +520,11 @@
if (needScaleInit) {
setComponentScaling();
}
}
- short tmp[] = new short[3];
+ short[] tmp = new short[3];
float ALMOST_TWO = 1.0f + (32767.0f / 32768.0f);
float factor = 65535.0f / ALMOST_TWO;
// For CIEXYZ, min = 0.0, max = ALMOST_TWO for all components
for (int i = 0; i < 3; i++) {
tmp[i] = (short) ((colorvalue[i] * factor) + 0.5f);
< prev index next >