3261N/A * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A/********************************************************************** 0N/A ********************************************************************** 0N/A ********************************************************************** 0N/A *** COPYRIGHT (c) Eastman Kodak Company, 1997 *** 0N/A *** As an unpublished work pursuant to Title 17 of the United *** 0N/A *** States Code. All rights reserved. *** 0N/A ********************************************************************** 0N/A ********************************************************************** 0N/A **********************************************************************/ 0N/A /* the class initializer */ 0N/A /* Actually, it is not a complete transform but just part of it */ 2693N/A /* Note that ICC_Profile.getNumComponents() is quite expensive 2693N/A * (it may results in a reading of the profile header). 2693N/A * So, here we cache the number of components of input and 2693N/A * output profiles for further usage. 2693N/A /* Note that ICC_Profile.getNumComponents() is quite expensive 2693N/A * (it may results in a reading of the profile header). 2693N/A * So, here we cache the number of components of input and 2693N/A * output profiles for further usage. 2693N/A // update native transfrom if needed 2693N/A // Disposer will destroy forgotten transform 0N/A // TODO check for src npixels = dst npixels 0N/A // process each scanline 0N/A for (
int y =
0; y < h; y++) {
0N/A // convert src scanline 0N/A for (
int x =
0; x < w; x++) {
0N/A // color convert srcLine to dstLine 0N/A // convert dst scanline 0N/A for (
int x =
0; x < w; x++) {
0N/A // process each scanline 0N/A for (
int y =
0; y < h; y++) {
0N/A // convert src scanline 0N/A for (
int x =
0; x < w; x++) {
0N/A // color convert srcLine to dstLine 0N/A // convert dst scanline 0N/A for (
int x =
0; x < w; x++) {
0N/A // Can't pass src and dst directly to CMM, so process per scanline 0N/A // process each scanline 0N/A for (
int y =
0; y < h; y++,
ys++,
yd++) {
0N/A for (
int x =
0; x < w; x++,
xs++) {
0N/A // color convert srcLine to dstLine 0N/A // store dst scanline 0N/A for (
int x =
0; x < w; x++,
xd++) {
0N/A // Can't pass src and dst directly to CMM, so process per scanline 0N/A // TODO check for src npixels = dst npixels 0N/A // process each scanline 0N/A for (
int y =
0; y < h; y++,
ys++,
yd++) {
0N/A for (
int x =
0; x < w; x++,
xs++) {
0N/A // color convert srcLine to dstLine 0N/A // store dst scanline 0N/A for (
int x =
0; x < w; x++,
xd++) {
0N/A // process each scanline 0N/A for (
int y =
0; y < h; y++,
ys++,
yd++) {
0N/A for (
int x =
0; x < w; x++,
xs++) {
0N/A // color convert srcLine to dstLine 0N/A // store dst scanline 0N/A for (
int x =
0; x < w; x++,
xd++) {
0N/A /* convert an array of colors in short format */ 0N/A /* each color is a contiguous set of array elements */ 0N/A /* the number of colors is (size of the array) / (number of input/output