CmykColorHelper

Inheritance: java.lang.Object

public final class CmykColorHelper

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

الطرق

طريقةالوصف
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الدفق الذي يحتوي على ملف تعريف CMYK Icc.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف RGB Icc.

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);
}

// حدد المسار إلى ملفات تعريف RGB و CMYK ICC المخصصة.
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الدفق الذي يحتوي على ملف تعريف CMYK Icc.
rgbIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف RGB Icc.

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);
}

// حدد المسار إلى ملفات تعريف RGB و CMYK ICC المخصصة.
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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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الدفق الذي يحتوي على ملف تعريف RGB Icc.
cmykIccStreamjava.io.InputStreamالدفق الذي يحتوي على ملف تعريف CMYK Icc.

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