/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
*** As an unpublished work pursuant to Title 17 of the United ***
*** States Code. All rights reserved. ***
**********************************************************************
**********************************************************************
**********************************************************************/
long ID;
private int inFormatter;
private int outFormatter;
long [] profileIDs;
int renderType;
int transformType;
/* the class initializer */
static {
if (ProfileDeferralMgr.deferring) {
}
}
int transformType)
{
/* Actually, it is not a complete transform but just part of it */
profileIDs = new long[1];
this.transformType = transformType;
/* Note that ICC_Profile.getNumComponents() is quite expensive
* (it may results in a reading of the profile header).
* So, here we cache the number of components of input and
* output profiles for further usage.
*/
}
int size = 0;
}
profileIDs = new long[size];
int j = 0;
}
/* Note that ICC_Profile.getNumComponents() is quite expensive
* (it may results in a reading of the profile header).
* So, here we cache the number of components of input and
* output profiles for further usage.
*/
}
public int getNumInComponents() {
return numInComponents;
}
public int getNumOutComponents() {
return numOutComponents;
}
// update native transfrom if needed
if (ID == 0L ||
if (ID != 0L) {
// Disposer will destroy forgotten transform
disposerReferent = new Object();
}
}
}
{
try {
return;
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert images");
}
}
int precision = 8;
float maxNum = 255.0f;
for (int i = 0; i < srcNumComp; i++) {
precision = 16;
maxNum = 65535.0f;
}
}
for (int i = 0; i < dstNumComp; i++) {
precision = 16;
maxNum = 65535.0f;
}
}
float[] srcMinVal = new float[srcNumComp];
float[] srcInvDiffMinMax = new float[srcNumComp];
for (int i = 0; i < srcNumComp; i++) {
}
float[] dstMinVal = new float[dstNumComp];
float[] dstDiffMinMax = new float[dstNumComp];
for (int i = 0; i < dstNumComp; i++) {
}
float[] dstColor;
if (dstHasAlpha) {
} else {
dstColor = new float[dstNumComp];
}
if (precision == 8) {
byte[] srcLine = new byte[w * srcNumComp];
byte[] dstLine = new byte[w * dstNumComp];
float[] color;
if (needSrcAlpha) {
alpha = new float[w];
}
int idx;
// TODO check for src npixels = dst npixels
try {
srcIL = new LCMSImageLayout(
dstIL = new LCMSImageLayout(
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert images");
}
// process each scanline
for (int y = 0; y < h; y++) {
// convert src scanline
idx = 0;
for (int x = 0; x < w; x++) {
for (int i = 0; i < srcNumComp; i++) {
0.5f);
}
if (needSrcAlpha) {
}
}
// color convert srcLine to dstLine
// convert dst scanline
idx = 0;
for (int x = 0; x < w; x++) {
for (int i = 0; i < dstNumComp; i++) {
dstDiffMinMax[i] + dstMinVal[i];
}
if (needSrcAlpha) {
} else if (dstHasAlpha) {
}
}
}
} else {
short[] srcLine = new short[w * srcNumComp];
short[] dstLine = new short[w * dstNumComp];
float[] color;
if (needSrcAlpha) {
alpha = new float[w];
}
int idx;
try {
srcIL = new LCMSImageLayout(
dstIL = new LCMSImageLayout(
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert images");
}
// process each scanline
for (int y = 0; y < h; y++) {
// convert src scanline
idx = 0;
for (int x = 0; x < w; x++) {
for (int i = 0; i < srcNumComp; i++) {
0.5f);
}
if (needSrcAlpha) {
}
}
// color convert srcLine to dstLine
// convert dst scanline
idx = 0;
for (int x = 0; x < w; x++) {
for (int i = 0; i < dstNumComp; i++) {
dstDiffMinMax[i] + dstMinVal[i];
}
if (needSrcAlpha) {
} else if (dstHasAlpha) {
}
}
}
}
}
// Can't pass src and dst directly to CMM, so process per scanline
boolean srcIsFloat, dstIsFloat;
srcIsFloat = true;
} else {
srcIsFloat = false;
}
dstIsFloat = true;
} else {
dstIsFloat = false;
}
float[] srcScaleFactor = new float[srcNumBands];
float[] dstScaleFactor = new float[dstNumBands];
float[] srcUseMinVal = new float[srcNumBands];
float[] dstUseMinVal = new float[dstNumBands];
for (int i = 0; i < srcNumBands; i++) {
if (srcIsFloat) {
srcUseMinVal[i] = srcMinVal[i];
} else {
} else {
srcScaleFactor[i] = 65535.0f /
}
srcUseMinVal[i] = 0.0f;
}
}
for (int i = 0; i < dstNumBands; i++) {
if (dstIsFloat) {
dstUseMinVal[i] = dstMinVal[i];
} else {
} else {
dstScaleFactor[i] =
65535.0f;
}
dstUseMinVal[i] = 0.0f;
}
}
float sample;
short[] srcLine = new short[w * srcNumBands];
short[] dstLine = new short[w * dstNumBands];
int idx;
try {
srcIL = new LCMSImageLayout(
dstIL = new LCMSImageLayout(
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert rasters");
}
// process each scanline
// get src scanline
idx = 0;
for (int x = 0; x < w; x++, xs++) {
for (int i = 0; i < srcNumBands; i++) {
}
}
// color convert srcLine to dstLine
// store dst scanline
idx = 0;
for (int x = 0; x < w; x++, xd++) {
for (int i = 0; i < dstNumBands; i++) {
dstUseMinVal[i];
}
}
}
}
// Can't pass src and dst directly to CMM, so process per scanline
int precision = 8;
float maxNum = 255.0f;
for (int i = 0; i < srcNumBands; i++) {
precision = 16;
maxNum = 65535.0f;
}
}
for (int i = 0; i < dstNumBands; i++) {
precision = 16;
maxNum = 65535.0f;
}
}
float[] srcScaleFactor = new float[srcNumBands];
float[] dstScaleFactor = new float[dstNumBands];
for (int i = 0; i < srcNumBands; i++) {
} else {
srcScaleFactor[i] = maxNum /
}
}
for (int i = 0; i < dstNumBands; i++) {
} else {
dstScaleFactor[i] =
}
}
int sample;
if (precision == 8) {
byte[] srcLine = new byte[w * srcNumBands];
byte[] dstLine = new byte[w * dstNumBands];
int idx;
// TODO check for src npixels = dst npixels
try {
srcIL = new LCMSImageLayout(
dstIL = new LCMSImageLayout(
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert rasters");
}
// process each scanline
// get src scanline
idx = 0;
for (int x = 0; x < w; x++, xs++) {
for (int i = 0; i < srcNumBands; i++) {
}
}
// color convert srcLine to dstLine
// store dst scanline
idx = 0;
for (int x = 0; x < w; x++, xd++) {
for (int i = 0; i < dstNumBands; i++) {
dstScaleFactor[i]) + 0.5f);
}
}
}
} else {
short[] srcLine = new short[w * srcNumBands];
short[] dstLine = new short[w * dstNumBands];
int idx;
try {
srcIL = new LCMSImageLayout(
dstIL = new LCMSImageLayout(
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert rasters");
}
// process each scanline
// get src scanline
idx = 0;
for (int x = 0; x < w; x++, xs++) {
for (int i = 0; i < srcNumBands; i++) {
}
}
// color convert srcLine to dstLine
// store dst scanline
idx = 0;
for (int x = 0; x < w; x++, xd++) {
for (int i = 0; i < dstNumBands; i++) {
dstScaleFactor[i]) + 0.5f);
}
}
}
}
}
/* convert an array of colors in short format */
/* each color is a contiguous set of array elements */
components */
}
try {
return dst;
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert data");
}
}
}
try {
return dst;
} catch (ImageLayoutException e) {
throw new CMMException("Unable to convert data");
}
}
}