473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

RGB to CMYK

Hi All,

I want to take an image maybe in a jpeg or gif format or rgb and convert it
to a series of CMYK images (one for each colour). If there an easy way using
the API of java 2, or JAI. If not does anybody no an algorithm I can use to
implement this conversion.

Cheers,

Adam
Jul 17 '05 #1
1 20220
"Oracle3001" <ad*************@hotmail.com> wrote in message news:<bl**********@wisteria.csv.warwick.ac.uk>...
Hi All,

I want to take an image maybe in a jpeg or gif format or rgb and convert it
to a series of CMYK images (one for each colour). If there an easy way using
the API of java 2, or JAI. If not does anybody no an algorithm I can use to
implement this conversion.

Cheers,

Adam

Write a reverse function of this:

/** CMYK to RGB conversion */
/* Adobe PhotoShop algorithm
cyan = Math.min(255, cyan + black); //black is from K
magenta = Math.min(255, magenta + black);
yellow = Math.min(255, yellow + black);
rgb[0] = 255 - cyan;
rgb[1] = 255 - magenta;
rgb[2] = 255 - yellow;
*/

/* GNU Ghostscript algorithm -- this is better*/
int colors = 255 - black;
rgb[0] = colors * (255 - cyan)/255;
rgb[1] = colors * (255 - magenta)/255;
rgb[2] = colors * (255 - yellow)/255;
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mats Olsson | last post by:
How can I load a CMYK jpeg image (originally saved from Photoshop) and then turn it into an rgb BufferedImage, in order to display it on screen in an applet? I first tried ImageIO.read(), but...
4
by: Johan Holst Nielsen | last post by:
Hi all, I hope someone can help me. I have do do a color conversion from RGB to CMYK. It's harder than I thought :D Anyway, here is my problem. I tried some differents ways to do it - I...
0
by: Pavel | last post by:
Hi, can somebody tell me how can I check with GDI+ whether an image is CMYK? And whether it is LZW compressed or not(for TIFF images)? 10x in advance P.
3
by: MS | last post by:
I need to determine CMYK values from bitmaps. Is there a way in VB or Access to do this? The reason is that I need to determin the relative CMYK values. Example: A square with the bottom half...
0
by: Digit24 | last post by:
Is there any way to convert a cmyk image to rgb automatically through asp.net? Spent ages searching Google with not much success!
1
by: Digit24 | last post by:
I need to find a way of automatically creating RGB images from CMYK images. I am developing a system where the client will upload CMYK 300dpi images and I need to develop a script that will...
0
by: gt | last post by:
How can I check if an uploaded jpg uses a CMYK pallete? I'd like to test for this and either convert to a jpg that use RGB or prompt the user to do the conversion themselves. thanks
3
by: James | last post by:
Need help to convert a RGB (jpg) image to CMYK colors... Is it possible to convert i using GDI+? Can someone please give me som guide lines. Thanks for you help and time. Best Regards...
0
by: madhav001 | last post by:
Hi All, Is there any method to load DIB with CMYK image format. I am using the following method to store image pixel to DIB. In this case raster image in the RGBA format is used. We cannot store...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.