CmykColorHelper

Inheritance: java.lang.Object

public final class CmykColorHelper

طرق مساعدة للعمل مع لون CMYK المقدم كقيمة عدد صحيح 32-بت موقعة. يوفر واجهة برمجة تطبيقات مشابهة للهيكل CmykColor. إنه أخف وزنًا لأن لون CMYK يُقدم كـ Int32 فقط بدلاً من هيكل يحتوي على حقول داخلية. يرجى تفضيل استخدام الطرق الثابتة لهذه الفئة عندما يكون ذلك ممكنًا بدلاً من الهيكل CmykColor المهمل.

الطرق

طريقةالوصف
getC(int cmyk)يحصل على قيمة المكوّن السيان.
getM(int cmyk)يحصل على قيمة المكوّن الماجنتا.
getY(int cmyk)يحصل على قيمة المكوّن الأصفر.
getK(int cmyk)يحصل على قيمة المكوّن الأسود.
fromComponents(int cyan, int magenta, int yellow, int black)ينشئ CMYK من قيم السيان والماجنتا والأصفر والأسود 32-بت.
toCmyk(int[] argbPixels)التحويل من ألوان ARGB إلى ألوان CMYK.
toCmykBytes(int[] argbPixels, int startIndex, int length)يحوّل ARGB إلى CMYK.
toCmykaBytes(int[] argbPixels, int startIndex, int length)يحوّل ARGB إلى CMYKA (مع الشفافية).
toCmyk(int argbPixel)التحويل من لون ARGB إلى لون CMYK.
toCmyk(Color pixel)التحويل من لون ARGB إلى لون CMYK.
toCmyk(Color[] pixels)التحويل من ألوان ARGB إلى ألوان CMYK.
toArgb(int[] cmykPixels)التحويل من ألوان CMYK إلى ألوان ARGB.
toArgb(int cmykPixel)التحويل من لون CMYK إلى لون ARGB.
toArgb32(int[] cmykPixels)التحويل من ألوان CMYK إلى ألوان ARGB.
toArgb32(int[] cmykPixels, boolean reuseArray)يُجري التحويل من ألوان CMYK إلى ألوان ARGB ويخزنها في نفس المصفوفة إذا كان reuseArray صحيحًا.
toArgbIcc(int[] cmykPixels)التحويل من ألوان CMYK إلى ألوان ARGB باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)التحويل من ألوان CMYK إلى ألوان ARGB باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toArgbIcc(int cmykPixel)التحويل من لون CMYK إلى لون ARGB باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)التحويل من لون CMYK إلى لون ARGB باستخدام تحويل Icc مع ملف تعريف مخصص.
toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)يحوّل RGB إلى CMYK باستخدام ملفات ICC مخصصة.
toCmykIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)يحوّل RGB إلى CMYK باستخدام ملفات ICC مخصصة.
toCmykaIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)يحوّل RGB إلى CMYKA (مع ألفا) باستخدام ملفات ICC مخصصة.
toPsdCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toCmykaIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)يحوّل RGB إلى CMYKA (مع ألفا) باستخدام ملفات ICC مخصصة.
toCmykIcc(Color[] pixels)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toCmykIcc(int[] pixels)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toPsdCmykIcc(int[] pixels)التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toCmykIcc(Color pixel)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toCmykIcc(int argb)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toPsdCmykIcc(int argb)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.
toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toCmykIcc(int argb, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.
toPsdCmykIcc(int pixel, InputStream rgbIccStream, InputStream cmykIccStream)التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

getC(int cmyk)

public static int getC(int cmyk)

يحصل على قيمة المكوّن السيان.

Parameters:

معاملنوعالوصف
cmykintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: int - قيمة مكوّن السماوي.

Example: The following example shows how to convert RGB colors to their CMYK counterparts without applying ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK without using ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmyk(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(@%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

//المخرجات تبدو هكذا:
//حوّل RGB إلى CMYK دون استخدام ملفات ICC.
//RGB(255,0,0)        => CMYK(0,255,255,0)
//RGB(0,128,0)        => CMYK(255,0,255,127)
//RGB(0,0,255)        => CMYK(255,255,0,0)

getM(int cmyk)

public static int getM(int cmyk)

يحصل على قيمة المكوّن الماجنتا.

Parameters:

معاملنوعالوصف
cmykintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: int - قيمة مكوّن الماجنتا.

Example: The following example shows how to convert RGB colors to their CMYK counterparts without applying ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK without using ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmyk(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(@%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

//المخرجات تبدو هكذا:
//حوّل RGB إلى CMYK دون استخدام ملفات ICC.
//RGB(255,0,0)        => CMYK(0,255,255,0)
//RGB(0,128,0)        => CMYK(255,0,255,127)
//RGB(0,0,255)        => CMYK(255,255,0,0)

getY(int cmyk)

public static int getY(int cmyk)

يحصل على قيمة المكوّن الأصفر.

Parameters:

معاملنوعالوصف
cmykintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: int - قيمة مكوّن الأصفر.

Example: The following example shows how to convert RGB colors to their CMYK counterparts without applying ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK without using ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmyk(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(@%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

//المخرجات تبدو هكذا:
//حوّل RGB إلى CMYK دون استخدام ملفات ICC.
//RGB(255,0,0)        => CMYK(0,255,255,0)
//RGB(0,128,0)        => CMYK(255,0,255,127)
//RGB(0,0,255)        => CMYK(255,255,0,0)

getK(int cmyk)

public static int getK(int cmyk)

يحصل على قيمة المكوّن الأسود.

Parameters:

معاملنوعالوصف
cmykintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: int - قيمة مكوّن الأسود.

Example: The following example shows how to convert RGB colors to their CMYK counterparts without applying ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK without using ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmyk(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(@%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

//المخرجات تبدو هكذا:
//حوّل RGB إلى CMYK دون استخدام ملفات ICC.
//RGB(255,0,0)        => CMYK(0,255,255,0)
//RGB(0,128,0)        => CMYK(255,0,255,127)
//RGB(0,0,255)        => CMYK(255,255,0,0)

fromComponents(int cyan, int magenta, int yellow, int black)

public static int fromComponents(int cyan, int magenta, int yellow, int black)

ينشئ CMYK من قيم السيان والماجنتا والأصفر والأسود 32-بت.

Parameters:

معاملنوعالوصف
سماويintالمكوّن السماوي. القيم الصالحة هي من 0 إلى 255.
ماجنتاintالمكوّن الماجنتا. القيم الصالحة هي من 0 إلى 255.
أصفرintالمكوّن الأصفر. القيم الصالحة هي من 0 إلى 255.
أسودintالمكوّن الأسود. القيم الصالحة هي من 0 إلى 255.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

Example: The following example shows how to convert CMYK colors to their RGB counterparts in a fast manner following straightforward formulas without using ICC profiles.

int[] cmykColors = new int[]
        {
                com.aspose.imaging.CmykColorHelper.fromComponents(255, 0, 0, 0),   // Cyan
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 255, 0, 0),   // Magenta
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 255, 0),   // Yellow
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 0, 255),   // Black
        };

System.out.println("Convert CMYK to RGB without using ICC profiles.");
for (int cmykColor : cmykColors) {
    com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgb(cmykColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

    System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, (int) rgbColor.getB() & 0xff);
}

//المخرجات تبدو هكذا:
//حوّل CMYK إلى RGB دون استخدام ملفات تعريف ICC.
//CMYK(255,0,0,0)        => RGB(0,255,255)
//CMYK(0,255,0,0)        => RGB(255,0,255)
//CMYK(0,0,255,0)        => RGB(255,255,0)
//CMYK(0,0,0,255)        => RGB(0,0,0)

toCmyk(int[] argbPixels)

public static int[] toCmyk(int[] argbPixels)

التحويل من ألوان ARGB إلى ألوان CMYK.

Parameters:

معاملنوعالوصف
argbPixelsint[]ألوان ARGB الممثّلة كقيم عدد صحيح 32-بت.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toCmykBytes(int[] argbPixels, int startIndex, int length)

public static byte[] toCmykBytes(int[] argbPixels, int startIndex, int length)

يحوّل ARGB إلى CMYK.

Parameters:

معاملنوعالوصف
argbPixelsint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toCmykaBytes(int[] argbPixels, int startIndex, int length)

public static byte[] toCmykaBytes(int[] argbPixels, int startIndex, int length)

يحوّل ARGB إلى CMYKA (مع الشفافية).

Parameters:

معاملنوعالوصف
argbPixelsint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toCmyk(int argbPixel)

public static int toCmyk(int argbPixel)

التحويل من لون ARGB إلى لون CMYK.

Parameters:

معاملنوعالوصف
argbPixelintلون ARGB المقدم كقيمة عدد صحيح 32-بت.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

toCmyk(Color pixel)

public static int toCmyk(Color pixel)

التحويل من لون ARGB إلى لون CMYK.

Parameters:

معاملنوعالوصف
pixelColorلون ARGB.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

Example: The following example shows how to convert RGB colors to their CMYK counterparts without applying ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK without using ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmyk(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(@%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

//المخرجات تبدو هكذا:
//حوّل RGB إلى CMYK دون استخدام ملفات ICC.
//RGB(255,0,0)        => CMYK(0,255,255,0)
//RGB(0,128,0)        => CMYK(255,0,255,127)
//RGB(0,0,255)        => CMYK(255,255,0,0)

toCmyk(Color[] pixels)

public static int[] toCmyk(Color[] pixels)

التحويل من ألوان ARGB إلى ألوان CMYK.

Parameters:

معاملنوعالوصف
pixelsColor[]ألوان ARGB.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toArgb(int[] cmykPixels)

public static Color[] toArgb(int[] cmykPixels)

التحويل من ألوان CMYK إلى ألوان ARGB.

Parameters:

معاملنوعالوصف
cmykPixelsint[]ألوان CMYK المقدمة كقيم عدد صحيح 32-بت.

Returns: com.aspose.imaging.Color[] - ألوان ARGB.

toArgb(int cmykPixel)

public static Color toArgb(int cmykPixel)

التحويل من لون CMYK إلى لون ARGB.

Parameters:

معاملنوعالوصف
cmykPixelintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: Color - The ARGB color.

Example: The following example shows how to convert CMYK colors to their RGB counterparts in a fast manner following straightforward formulas without using ICC profiles.

int[] cmykColors = new int[]
        {
                com.aspose.imaging.CmykColorHelper.fromComponents(255, 0, 0, 0),   // Cyan
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 255, 0, 0),   // Magenta
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 255, 0),   // Yellow
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 0, 255),   // Black
        };

System.out.println("Convert CMYK to RGB without using ICC profiles.");
for (int cmykColor : cmykColors) {
    com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgb(cmykColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

    System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, (int) rgbColor.getB() & 0xff);
}

//المخرجات تبدو هكذا:
//حوّل CMYK إلى RGB دون استخدام ملفات تعريف ICC.
//CMYK(255,0,0,0)        => RGB(0,255,255)
//CMYK(0,255,0,0)        => RGB(255,0,255)
//CMYK(0,0,255,0)        => RGB(255,255,0)
//CMYK(0,0,0,255)        => RGB(0,0,0)

toArgb32(int[] cmykPixels)

public static int[] toArgb32(int[] cmykPixels)

التحويل من ألوان CMYK إلى ألوان ARGB.

Parameters:

معاملنوعالوصف
cmykPixelsint[]ألوان CMYK المقدمة كقيم عدد صحيح 32-بت.

Returns: int[] - ألوان ARGB المقدمة كقيم عدد صحيح 32-بت.

toArgb32(int[] cmykPixels, boolean reuseArray)

public static int[] toArgb32(int[] cmykPixels, boolean reuseArray)

يُجري التحويل من ألوان CMYK إلى ألوان ARGB ويخزنها في نفس المصفوفة إذا كان reuseArray صحيحًا. وإلا، سيتم تخصيص مصفوفة جديدة.

Parameters:

معاملنوعالوصف
cmykPixelsint[]ألوان CMYK المقدمة كقيم عدد صحيح 32-بت.
reuseArraybooleanإذا كان true فسيتم إعادة ملء مصفوفة cmykPixels المدخلة بقيم جديدة وإرجاعها؛ وإلا سيتم تخصيص مصفوفة جديدة وإرجاعها.

Returns: int[] - المصفوفة الجديدة المخصصة أو cmykPixels المملوءة بألوان ARGB المقدمة كقيم عدد صحيح 32-بت.

toArgbIcc(int[] cmykPixels)

public static Color[] toArgbIcc(int[] cmykPixels)

التحويل من ألوان CMYK إلى ألوان ARGB باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
cmykPixelsint[]بكسلات CMYK المقدمة كقيم عدد صحيح 32-بت.

Returns: com.aspose.imaging.Color[] - ألوان ARGB.

toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)

public static Color[] toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)

التحويل من ألوان CMYK إلى ألوان ARGB باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
cmykPixelsint[]ألوان CMYK المقدمة كقيم عدد صحيح 32-بت.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.

Returns: com.aspose.imaging.Color[] - ألوان ARGB.

toArgbIcc(int cmykPixel)

public static Color toArgbIcc(int cmykPixel)

التحويل من لون CMYK إلى لون ARGB باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
cmykPixelintلون CMYK مقدم كقيمة عدد صحيح 32-بت.

Returns: Color - The ARGB color.

Example: The following example shows how to convert CMYK colors to their RGB counterparts using ICC profiles.

int[] cmykColors = new int[]
        {
                com.aspose.imaging.CmykColorHelper.fromComponents(255, 0, 0, 0),   // Cyan
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 255, 0, 0),   // Magenta
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 255, 0),   // Yellow
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 0, 255),   // Black
        };

System.out.println("Convert CMYK to RGB using default ICC profiles.");
for (int cmykColor : cmykColors) {
    com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgbIcc(cmykColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

    System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff);
}

// حدد المسار إلى ملفات تعريف ICC المخصصة لـ RGB و CMYK.
String dir = "c:\\temp\\iccprofiles\\";

System.out.println("Convert CMYK to RGB using custom ICC profiles.");
// اقرأ جميع البايتات من ملفات ICC إلى الذاكرة لتتمكن من إعادة ضبط دفق ملف تعريف الإدخال قبل استدعاء toCmykIcc.
byte[] rgbProfileBytes;
java.io.RandomAccessFile rgbProfile = new java.io.RandomAccessFile(dir + "eciRGB_v2.icc", "r");
try {
    rgbProfileBytes = new byte[(int) rgbProfile.length()];
    rgbProfile.readFully(rgbProfileBytes);
} finally {
    rgbProfile.close();
}

byte[] cmykProfileBytes;
java.io.RandomAccessFile cmykProfile = new java.io.RandomAccessFile(dir + "ISOcoated_v2_FullGamut4.icc", "r");
try {
    cmykProfileBytes = new byte[(int) cmykProfile.length()];
    cmykProfile.readFully(cmykProfileBytes);
} finally {
    cmykProfile.close();
}

java.io.InputStream rgbProfileStream = new java.io.ByteArrayInputStream(rgbProfileBytes);
java.io.InputStream cmykProfileStream = new java.io.ByteArrayInputStream(cmykProfileBytes);
try {
    for (int cmykColor : cmykColors) {
        com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgbIcc(cmykColor);
        int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
        int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
        int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
        int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

        System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff);
    }
} finally {
    cmykProfileStream.close();
    rgbProfileStream.close();
}

//المخرجات تبدو هكذا:
//حوّل CMYK إلى RGB باستخدام ملفات تعريف ICC الافتراضية.
//CMYK(255,0,0,0)        => RGB(46,188,220)
//CMYK(0,255,0,0)        => RGB(231,52,142)
//CMYK(0,0,255,0)        => RGB(244,253,63)
//CMYK(0,0,0,255)        => RGB(21,21,21)
//تحويل CMYK إلى RGB باستخدام ملفات تعريف ICC مخصصة.
//CMYK(255,0,0,0)        => RGB(46,188,220)
//CMYK(0,255,0,0)        => RGB(231,52,142)
//(0,0,255,0)            => RGB(244,253,63)
//CMYK(0,0,0,255)        => RGB(21,21,21)

toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)

public static Color toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)

التحويل من لون CMYK إلى لون ARGB باستخدام تحويل Icc مع ملف تعريف مخصص.

Parameters:

معاملنوعالوصف
cmykPixelintلون CMYK مقدم كقيمة عدد صحيح 32-بت.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.

Returns: Color - The ARGB color.

Example: The following example shows how to convert CMYK colors to their RGB counterparts using ICC profiles.

int[] cmykColors = new int[]
        {
                com.aspose.imaging.CmykColorHelper.fromComponents(255, 0, 0, 0),   // Cyan
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 255, 0, 0),   // Magenta
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 255, 0),   // Yellow
                com.aspose.imaging.CmykColorHelper.fromComponents(0, 0, 0, 255),   // Black
        };

System.out.println("Convert CMYK to RGB using default ICC profiles.");
for (int cmykColor : cmykColors) {
    com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgbIcc(cmykColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

    System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff);
}

// حدد المسار إلى ملفات تعريف ICC المخصصة لـ RGB و CMYK.
String dir = "c:\\temp\\iccprofiles\\";

System.out.println("Convert CMYK to RGB using custom ICC profiles.");
// اقرأ جميع البايتات من ملفات ICC إلى الذاكرة لتتمكن من إعادة ضبط دفق ملف تعريف الإدخال قبل استدعاء toCmykIcc.
byte[] rgbProfileBytes;
java.io.RandomAccessFile rgbProfile = new java.io.RandomAccessFile(dir + "eciRGB_v2.icc", "r");
try {
    rgbProfileBytes = new byte[(int) rgbProfile.length()];
    rgbProfile.readFully(rgbProfileBytes);
} finally {
    rgbProfile.close();
}

byte[] cmykProfileBytes;
java.io.RandomAccessFile cmykProfile = new java.io.RandomAccessFile(dir + "ISOcoated_v2_FullGamut4.icc", "r");
try {
    cmykProfileBytes = new byte[(int) cmykProfile.length()];
    cmykProfile.readFully(cmykProfileBytes);
} finally {
    cmykProfile.close();
}

java.io.InputStream rgbProfileStream = new java.io.ByteArrayInputStream(rgbProfileBytes);
java.io.InputStream cmykProfileStream = new java.io.ByteArrayInputStream(cmykProfileBytes);
try {
    for (int cmykColor : cmykColors) {
        com.aspose.imaging.Color rgbColor = com.aspose.imaging.CmykColorHelper.toArgbIcc(cmykColor);
        int c = com.aspose.imaging.CmykColorHelper.getC(cmykColor);
        int m = com.aspose.imaging.CmykColorHelper.getM(cmykColor);
        int y = com.aspose.imaging.CmykColorHelper.getY(cmykColor);
        int k = com.aspose.imaging.CmykColorHelper.getK(cmykColor);

        System.out.printf("CMYK(%s,%s,%s,%s)\t\t=> RGB(%s,%s,%s)\r\n", c, m, y, k, rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff);
    }
} finally {
    cmykProfileStream.close();
    rgbProfileStream.close();
}

//المخرجات تبدو هكذا:
//حوّل CMYK إلى RGB باستخدام ملفات تعريف ICC الافتراضية.
//CMYK(255,0,0,0)        => RGB(46,188,220)
//CMYK(0,255,0,0)        => RGB(231,52,142)
//CMYK(0,0,255,0)        => RGB(244,253,63)
//CMYK(0,0,0,255)        => RGB(21,21,21)
//تحويل CMYK إلى RGB باستخدام ملفات تعريف ICC مخصصة.
//CMYK(255,0,0,0)        => RGB(46,188,220)
//CMYK(0,255,0,0)        => RGB(231,52,142)
//(0,0,255,0)            => RGB(244,253,63)
//CMYK(0,0,0,255)        => RGB(21,21,21)

toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

public static int[] toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
pixelsColor[]ألوان ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

public static int[] toCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

public static byte[] toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

يحوّل RGB إلى CMYK باستخدام ملفات ICC مخصصة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.
rgbIccStreamjava.io.InputStreamدفق ملف تعريف RGB.
cmykIccStreamjava.io.InputStreamدفق ملف تعريف CMYK.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toCmykIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)

public static byte[] toCmykIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)

يحوّل RGB إلى CMYK باستخدام ملفات ICC مخصصة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.
cmykBytesbyte[]بايتات Cmyk.
cmykOffsetintإزاحة cmykBytes.
rgbIccStreamjava.io.InputStreamدفق ملف تعريف RGB.
cmykIccStreamjava.io.InputStreamدفق ملف تعريف CMYK.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toCmykaIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)

public static byte[] toCmykaIccBytes(int[] pixels, int startIndex, int length, byte[] cmykBytes, int cmykOffset, InputStream rgbIccStream, InputStream cmykIccStream)

يحوّل RGB إلى CMYKA (مع ألفا) باستخدام ملفات ICC مخصصة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.
cmykBytesbyte[]بايتات Cmyk.
cmykOffsetintإزاحة cmykBytes.
rgbIccStreamjava.io.InputStreamدفق ملف تعريف RGB.
cmykIccStreamjava.io.InputStreamدفق ملف تعريف CMYK.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toPsdCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

public static int[] toPsdCmykIcc(int[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة. يستخدم تنسيق PSD CMYK بترتيب بايت KCMY مع قيم قنوات مقلوبة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int[] - ألوان CMYK المقدمة كقيم صحيحة 32-بت بترتيب بايت KCMY مع قيم قنوات مقلوبة.

toCmykaIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

public static byte[] toCmykaIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

يحوّل RGB إلى CMYKA (مع ألفا) باستخدام ملفات ICC مخصصة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان RGB الممثّلة كقيم عدد صحيح 32-بت.
startIndexintفهرس البداية للون RGB.
lengthintعدد بكسلات RGB للتحويل.
rgbIccStreamjava.io.InputStreamدفق ملف تعريف RGB.
cmykIccStreamjava.io.InputStreamدفق ملف تعريف CMYK.

Returns: byte[] - ألوان CMYK المقدمة كمصفوفة بايت.

toCmykIcc(Color[] pixels)

public static int[] toCmykIcc(Color[] pixels)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
pixelsColor[]ألوان ARGB.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toCmykIcc(int[] pixels)

public static int[] toCmykIcc(int[] pixels)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان ARGB.

Returns: int[] - ألوان CMYK الممثّلة كقيم عدد صحيح 32-بت.

toPsdCmykIcc(int[] pixels)

public static int[] toPsdCmykIcc(int[] pixels)

التحويل من ألوان ARGB إلى ألوان CMYK باستخدام تحويل Icc مع ملفات تعريف افتراضية. يستخدم تنسيق PSD CMYK بترتيب بايت KCMY مع قيم قنوات مقلوبة.

Parameters:

معاملنوعالوصف
بكسلاتint[]ألوان ARGB.

Returns: int[] - ألوان CMYK المقدمة كقيم صحيحة 32-بت بترتيب بايت KCMY مع قيم قنوات مقلوبة.

toCmykIcc(Color pixel)

public static int toCmykIcc(Color pixel)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
pixelColorلون ARGB.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

Example: The following example shows how to convert RGB colors to their CMYK counterparts using ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK using default ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmykIcc(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

// حدد المسار إلى ملفات تعريف RGB و CMYK ICC.
String dir = "c:\\temp\\iccprofiles\\";

System.out.println("Convert RGB to CMYK using custom ICC profiles.");

// اقرأ جميع البايتات من ملفات ICC إلى الذاكرة لتتمكن من إعادة ضبط دفق ملف تعريف الإدخال قبل استدعاء toCmykIcc.
byte[] rgbProfileBytes;
java.io.RandomAccessFile rgbProfile = new java.io.RandomAccessFile(dir + "eciRGB_v2.icc", "r");
try {
    rgbProfileBytes = new byte[(int) rgbProfile.length()];
    rgbProfile.readFully(rgbProfileBytes);
} finally {
    rgbProfile.close();
}

byte[] cmykProfileBytes;
java.io.RandomAccessFile cmykProfile = new java.io.RandomAccessFile(dir + "ISOcoated_v2_FullGamut4.icc", "r");
try {
    cmykProfileBytes = new byte[(int) cmykProfile.length()];
    cmykProfile.readFully(cmykProfileBytes);
} finally {
    cmykProfile.close();
}

java.io.InputStream rgbProfileStream = new java.io.ByteArrayInputStream(rgbProfileBytes);
java.io.InputStream cmykProfileStream = new java.io.ByteArrayInputStream(cmykProfileBytes);
try {
    for (com.aspose.imaging.Color rgbColor : rgbColors) {

        int cmyk = com.aspose.imaging.CmykColorHelper.toCmykIcc(rgbColor, rgbProfileStream, cmykProfileStream);
        int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
        int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
        int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
        int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

        System.out.printf("RGB(%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
    }
} finally {
    cmykProfileStream.close();
    rgbProfileStream.close();
}

//المخرجات تبدو هكذا:
//تحويل RGB إلى CMYK باستخدام ملفات تعريف ICC افتراضية.
//RGB(255,0,0)        => CMYK(0,254,249,15)
//RGB(0,128,0)        => CMYK(247,21,254,85)
//RGB(0,0,255)        => CMYK(254,195,0,134)
//تحويل RGB إلى CMYK باستخدام ملفات تعريف ICC مخصصة.
//RGB(255,0,0)        => CMYK(0,207,219,0)
//RGB(0,128,0)        => CMYK(238,16,254,80)
//RGB(0,0,255)        => CMYK(242,182,0,0)

toCmykIcc(int argb)

public static int toCmykIcc(int argb)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات التعريف الافتراضية.

Parameters:

معاملنوعالوصف
argbintلون ARGB.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

toPsdCmykIcc(int argb)

public static int toPsdCmykIcc(int argb)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف افتراضية. يستخدم تنسيق PSD CMYK بترتيب بايت KCMY مع قيم قنوات مقلوبة.

Parameters:

معاملنوعالوصف
argbintلون ARGB.

Returns: int - اللون CMYK المقدم كقيمة عدد صحيح 32-بت بترتيب بايت KCMY مع قيم القنوات المعكوسة.

toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

public static int toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
pixelColorلون ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

Example: The following example shows how to convert RGB colors to their CMYK counterparts using ICC profiles.

com.aspose.imaging.Color[] rgbColors = new com.aspose.imaging.Color[]
        {
                com.aspose.imaging.Color.getRed(),
                com.aspose.imaging.Color.getGreen(),
                com.aspose.imaging.Color.getBlue(),
        };

System.out.println("Convert RGB to CMYK using default ICC profiles.");
for (com.aspose.imaging.Color rgbColor : rgbColors) {
    int cmyk = com.aspose.imaging.CmykColorHelper.toCmykIcc(rgbColor);
    int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
    int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
    int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
    int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

    System.out.printf("RGB(%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
}

// حدد المسار إلى ملفات تعريف RGB و CMYK ICC.
String dir = "c:\\temp\\iccprofiles\\";

System.out.println("Convert RGB to CMYK using custom ICC profiles.");

// اقرأ جميع البايتات من ملفات ICC إلى الذاكرة لتتمكن من إعادة ضبط دفق ملف تعريف الإدخال قبل استدعاء toCmykIcc.
byte[] rgbProfileBytes;
java.io.RandomAccessFile rgbProfile = new java.io.RandomAccessFile(dir + "eciRGB_v2.icc", "r");
try {
    rgbProfileBytes = new byte[(int) rgbProfile.length()];
    rgbProfile.readFully(rgbProfileBytes);
} finally {
    rgbProfile.close();
}

byte[] cmykProfileBytes;
java.io.RandomAccessFile cmykProfile = new java.io.RandomAccessFile(dir + "ISOcoated_v2_FullGamut4.icc", "r");
try {
    cmykProfileBytes = new byte[(int) cmykProfile.length()];
    cmykProfile.readFully(cmykProfileBytes);
} finally {
    cmykProfile.close();
}

java.io.InputStream rgbProfileStream = new java.io.ByteArrayInputStream(rgbProfileBytes);
java.io.InputStream cmykProfileStream = new java.io.ByteArrayInputStream(cmykProfileBytes);
try {
    for (com.aspose.imaging.Color rgbColor : rgbColors) {

        int cmyk = com.aspose.imaging.CmykColorHelper.toCmykIcc(rgbColor, rgbProfileStream, cmykProfileStream);
        int c = com.aspose.imaging.CmykColorHelper.getC(cmyk);
        int m = com.aspose.imaging.CmykColorHelper.getM(cmyk);
        int y = com.aspose.imaging.CmykColorHelper.getY(cmyk);
        int k = com.aspose.imaging.CmykColorHelper.getK(cmyk);

        System.out.printf("RGB(%s,%s,%s)\t\t=> CMYK(%s,%s,%s,%s)\r\n", rgbColor.getR() & 0xff, rgbColor.getG() & 0xff, rgbColor.getB() & 0xff, c, m, y, k);
    }
} finally {
    cmykProfileStream.close();
    rgbProfileStream.close();
}

//المخرجات تبدو هكذا:
//تحويل RGB إلى CMYK باستخدام ملفات تعريف ICC افتراضية.
//RGB(255,0,0)        => CMYK(0,254,249,15)
//RGB(0,128,0)        => CMYK(247,21,254,85)
//RGB(0,0,255)        => CMYK(254,195,0,134)
//تحويل RGB إلى CMYK باستخدام ملفات تعريف ICC مخصصة.
//RGB(255,0,0)        => CMYK(0,207,219,0)
//RGB(0,128,0)        => CMYK(238,16,254,80)
//RGB(0,0,255)        => CMYK(242,182,0,0)

toCmykIcc(int argb, InputStream rgbIccStream, InputStream cmykIccStream)

public static int toCmykIcc(int argb, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
argbintلون ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int - لون CMYK الممثّل كقيمة عدد صحيح 32-بت.

toPsdCmykIcc(int pixel, InputStream rgbIccStream, InputStream cmykIccStream)

public static int toPsdCmykIcc(int pixel, InputStream rgbIccStream, InputStream cmykIccStream)

التحويل من لون ARGB إلى لون CMYK باستخدام تحويل Icc مع ملفات تعريف مخصصة.

Parameters:

معاملنوعالوصف
بكسلintلون ARGB.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ RGB.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف Icc لـ CMYK.

Returns: int - ألوان CMYK المقدمة كقيم أعداد صحيحة 32-بت بترتيب بايت KCMY مع قيم القنوات المعكوسة.