Converting RGB to CIE Luv using ColorSpace

I've been reading the documentation of all the classes in java.awt.color, trying to figure out if the JDK has the ability to convert an RGB value into a CIE Luv value. It seems to have Luv related constants, but no obvious way to make the conversion.
If anyone knows how to use the ColorSpace to convert between different color spaces, lease let me know how!
Mark McKay
http://www.kitfox.com

Thanks for the detailed reply. Sure clear some of the doubts.
I just start to draw/design in Photoshop and illustrator, I save my files most as PNG, for a transparent background.
After I went to officework do the poster printing, I found the color of my print image are not as vivid as Mac preview.
To be precise, the poster I printed looks like has a very thin grey layer, it is not much noticeable, but it indeed lost some vivid color.  As I want to print out my works and keep color as close exact as Mac preview,  here is the issue of coverting RGB CMYK.
Please feel free to add for below:
1, Should I set color space in CMYK before drawing in PS/AI 
2,  in PS, I convert profile from PNG file to CMYK save as psd file,  that psd file preview exactly same as PNG.
But when saved as PDF, the file preview a bit grey.  Can someone explain this?
3, Now im thinking, since CMYK is all about printers, it really should be the profession in printing shop who shall check my image, and edit/convert to the right color space to fit their printers.

Similar Messages

  • Can a photoshop cmyk psd file converted to photoshop PDF be used online, or 1st convert to RGB?

    Can a photoshop cmyk psd file converted to photoshop PDF be used online, or 1st convert to RGB? (the client requested 300 res. and is using it for their online magazine)

    There should be no difficulty using CMYK online - all PDF viewers have to be able to convert to RGB for the screen. But I'd be very concerned about putting 300 dpi online. You should shrink it down to a suitable screen resolution.

  • ICC profile to convert RGB to CMYK,   jpeg is ok, png format have a problem

    When I use ICC profile to convert RGB to CMYK, jpeg format is ok, but png format have a problem.the color is lossy.
    It means, the png file color is shallow than jpeg file after convert.Could anybody help me?
    thanks
    source code
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.Iterator;
    import javax.imageio.IIOImage;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageTypeSpecifier;
    import javax.imageio.ImageWriteParam;
    import javax.imageio.ImageWriter;
    import javax.imageio.metadata.IIOMetadata;
    import javax.imageio.metadata.IIOMetadataNode;
    import javax.imageio.stream.ImageOutputStream;
    import org.w3c.dom.Node;
    import com.sun.image.codec.jpeg.ImageFormatException;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGEncodeParam;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class TestImage {
         public static void main(String args[]) throws ImageFormatException, IOException{
              BufferedImage readImage = null;
              try {
                  readImage = ImageIO.read(new File("C:\\TEST.jpg"));
              } catch (Exception e) {
                  e.printStackTrace();
                  readImage = null;
              readImage = CMYKProfile.getInstance().doChColor(readImage);
              writeImage(readImage, "C:\\TEST_after_.jpg", 1.0f);
        protected static String getSuffix(String filename) {
            int i = filename.lastIndexOf('.');
            if(i>0 && i<filename.length()-1) {
                return filename.substring(i+1).toLowerCase();
            return "";
        protected static void writeImage(BufferedImage image, String filename, float quality) {
            Iterator writers = ImageIO.getImageWritersBySuffix(getSuffix(filename));
            System.out.println("filename�F"+filename);
            if (writers.hasNext()) {
                ImageWriter writer = (ImageWriter)writers.next();
                try {
                    ImageOutputStream stream
                        = ImageIO.createImageOutputStream(new File(filename));
                    writer.setOutput(stream);
                    ImageWriteParam param = writer.getDefaultWriteParam();
                    if (param.canWriteCompressed()) {
                        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);//NO COMPRESS
                        param.setCompressionQuality(quality);
                    } else {
                        System.out.println("Compression is not supported.");
                    IIOMetadata metadata = null;
                    if(getSuffix(filename).equals("png") || getSuffix(filename).equals("PNG")){
                         ImageTypeSpecifier imageTypeSpecifier = new ImageTypeSpecifier(image);
                         metadata = writer.getDefaultImageMetadata(imageTypeSpecifier, param);
                            String sFormat = "javax_imageio_png_1.0";
                            Node node = metadata.getAsTree(sFormat);
                            IIOMetadataNode gammaNode = new IIOMetadataNode("gAMA");
                            String sGamma = "55556";
                            gammaNode.setAttribute("value", sGamma);
                            node.appendChild(gammaNode);
                            metadata.setFromTree(sFormat, node);
                    writer.write(null, new IIOImage(image, null, metadata), param);
                    writer.dispose();
                    return;
                } catch (IOException ex) {
                    ex.printStackTrace();
    }

    Hi,
    I am having similar problems. I have read somewhere that png format can not handle CMYK colorspace anyway, which I find odd (and plainly stupid IM(NS)HO) which would mean that converting to RGB and therefore using profiles is mandatory.
    May be you should check if the internal format of the png files claims it is RGB or CMYK (using ImageMagick's "identify" command for example).
    HTH
    JG

  • Rgb to CIE LAB and reverse

    In Imaq there is a Vi  called rgbtocolor2.vi that is useful to convert an RGB into Cie lab color code. Is there another vi in order to convert a color in the CIE lab color space into RGB ?

    I'm pretty sure there isn't a VI to do the reverse conversion, so you'll need to code it yourself.  The NI implementation of La*b* seems to be a little non-standard - see http://forums.ni.com/t5/LabVIEW/La-b-colour-conversion/td-p/1646458 - I think the issue is that LabVIEW doesn't do a gamma correction, whereas most other software does.

  • Converting RGB images (sRGB or Adobe RGB) to 709 color space.

    I'm trying to determine the correct way to convert RGB images (sRGB or Adobe RGB) to 709 color space.  I can't just use the "covert to profile" function to do this because it does not produce results that fall within the 16 to 235 range that 709 dictates.  I've read that you can simply use the "Levels" adjustment and change the output levels to 16 to 235.  While this would clearly compress the luminance to the correct range, I'm not entirely clear if the end result would be a proper conversion (i.e. if color and gamma, for example, would be technically correct.)
    I noticed that converting the profile to "HDTV (Rec. 709)" does alter the image, so I'm wondering what the result would be if I did both this AND used the levels control to compress the output range to 16 to 235.
    Thanks for any feedback on this.

    (1)
    http://en.wikipedia.org/wiki/Rec._709
    (2)
    http://en.wikipedia.org/wiki/Rec._601
    The transfer functions for Rec.709 (1) refer to the range [0..1] or for 8 bits per pixel [0...255].
    It seems that the clipping, black=16 and white=235 has to happen after the application of the
    transfer function. If this should be true, then we don't have a level compression but a level
    clipping at both ends, as already for Rec.601 (2), like here:
    The ICC-Profile HDTV(Rec.709) in Photoshop contains the primaries and the white point
    (both like that in sRGB) and the transfer functions for [0..1], coded by a LUT with high resolution,
    as found by Profile Inspector. There is no clipping.
    By the way, that`s the internal profile name, I don't know the file name of the profile.
    Softproofing, source in sRGB, target HDTV(Rec.709), without clipping:
    With numbers not preserved: no change of the appearance, as expected.
    With numbers preserved: shows the effect of different effective gammas. 
    Your questions are very clear and I'm not sure whether my comments help. The information
    in the internet is not convincing.
    Best regards --Gernot Hoffmann

  • Converting RGB PDF to CMYK PDF

    I'm looking for a way to convert RGB PDF's to CMYK PDF for printing purposes. The RGB PDF is created by an online Flash application and I'm hoping to convert the file using Acrobat via Command line. I have tried a couple of programs e.g. PStill and PDFcreator but these just don't do the job. It's important to use the command line due to the fact that the conversion must be done automatically on a dedicated server.
    Important to know is that the PDF consists of texts and images and gradients. This is a RGB example which I would like to convert. This is the CMYK output I have created manually.
    Other solutions next to Acrobat are also welcome as long as they do the job

    In your original message you say "the conversion must be done automatically on a dedicated server" - this implies that Acrobat is being used outside the EULA, which strictly forbids installation as a server process. Acrobat is licensed for individual interactive desktop use by one person, no other deployments are allowed.
    You cannot access Acrobat's editing and batch-processing functions from the commandline at all. Adobe has server-based solutions for PDF generation  (LiveCycle ES3) but they are extremely expensive and would need work to get them to do what you're looking for. Realistically, your Flash developer needs to recode his app to output in CMYK or you will need third-party software on the server to re-fry the files. I don't know of any off-the-shelf commandline tools which can perform color conversion on existing PDFs.

  • Converting RGB pdf to CMYK in acrobat 8 professional

    Hi Can anyone tell me why when i convert an RGB pdf to CMYK using convert colours in Advanced/Print production the image resolution changes as in you get a haze around the text etc!! it looks like the pdf was created in photoshop or the original image was from photoshop could it have anything to do with jpeg compression?? if so how can i get round this in acrobat i dont want to have to save as postscript and pdf it again in distiller everytime!!
    thanks
    whitey!!

    Hi Jon
    Sorry its been so long!!
    do you have an email i could send the before/after too??

  • How to make a script to convert RGB to CMYK as black 100%?

    Hi guy
    my customer sent me a book (144 pages) for print but all of them are RGB and Tiff, she scan them. there are on the page some texts and pictures. The text are R=30 G=30 B=30.I think if I can make a script I will do it very soon to black 100%, but unfortunately I dont know anything to make script 
    anybody can help me ?anybody can make it for me ?

    We need to know some more information.
    1. The book consists of 144 pages, and each page is in fact an RGB image in TIFF format.
        Correct?
        That means, the text is already rasterized, but with low resolution (no more than 300ppi).
        A very bad starting point, in my humble opinion. For offset printing this is not acceptable.
    2. Is the printing process offset printing or by digital printing?
    Nevertheless we may think about a conversion of these images into CMYK K-only (one plate
    per page) . 
    a) Increase contrast until R=G=B=0 for text.
    b) Convert each image into Grayscale, using a so-called Black-Ink-Profile, for instance
        Black-Ink-ISOCoated-v2-eci (can be explained later)
    c) Make empty CMYK image, here for  ISOCoated-v2-eci, and paste the Grayscale into the
        K-channel. All further handling happens as CMYK file for the process ISOCoated-v2-eci.
        Void plates CMY don't matter.
        Post #12 here:
        Re: Colour shift (from CMYK = 0 0 0 20 to Grayscale K = 22 !)
    All this can be done by an action (I hope so...).
    Much better would be a new start by InDesign with typographical text (K-only vector instead of raster)
    with images in RGB or CMYK, taking into account the intended process.
    Note: Photoshop can deliver vector text, if exported as PDF.
    Best regards --Gernot Hoffmann

  • Is there as easy way of batch converting RGB files to CMYK in OS Lion?

    Is there as easy way of batch converting RGB files to CMYK in OS Lion?
    I was using a photoshop droplet on my desktop but this no longer works due to the fact it requires rosetta support.
    Thx P

    From another forum after googling:
    Your computer came with everything you need, because ColorSync can do that and Apple provided AppleScripts for it. Go to your Applications folder and look for the AppleScript folder. Double click on the 'Example Scripts' alias and then open the ColorSync scripts. Drag and drop your images on the the 'Match to CMYK' script.
    You can open AppleScript Editor from Launchpad (it's in Utilities). Go to Help to Open Example Scripts Folder. In the ColorSync folder is a Match application. Double click to make it run.
    Now you know what it does you may need to change it for batch conversion.
    Go to AppleScript Editor and open what you've just found. And I'm sorry that's as far as my knowledge goes, hope some one can fill in the gaps.
    Or you may just want to look at something like Graphic Converter?
    Regards,
    Colin R.

  • Hi, cannot convert RGB to CMYK...

    I cannot find such an option in the Elements? Can anyone help how can I convert the files to CMYK from RGB using this tool...
    Thanks
    ansu

    Elements can't convert RGB to CMYK. You'd need the full Photoshop.
    Otherwise you can google 'RGB to CMYK' conversion to find online or software tools that can do that.
    The real question is why do you need CMYK. If it's a request from a printer shop, it's their job and responsibility to do the conversion, since such a conversion can only be properly done when you know the specificity of your printing tools, inks and papers.

  • Color converting RGB to CMYK mode???

    Is it possible to convert RGB to CMYK color mode in Elements 10?

    No, not really. If you google around, Richard Lynch had a sort of workaround for this for very early versions of PSE that could possibly be adapted for current use, but a proper CMYK conversion is much more complex, even with the proper tools, than going from sRGB to Adobe RGB, for example.
    If you have a mac you can do a mode conversion in Preview, but you may not like what you get from the print shop using that method.

  • Converting RGB to CMYK color

    Hi All,
    I have few BASIC Questions on converting RGB to CMYK  in Photoshop and Illustrator. Hope could get some professional insights here.
    1, Are all the DTG printers set only in CMYK color mode ?
    2, If there is no difference after viewing RGB image with 'Gamaut Warning' (Photoshop),  Does that mean I'll have the exact print result as monitor view ?
    and Basically no need for CMYK conversion  ?
    3, Please list some the most effective way to convert RGB to CMYK, and keep the final CMYK color result as close as the RGB.
    4, when I simply convert one RGB image to CMYK color, why Ps/AI don't allow me to save as PNG file ?
    ( I save the file as PDF, but I cannot edit this PDF using apple preview app  )
    5, compare Photoshop to Illustrator, which one result better final CMYK color image ?

    Thanks for the detailed reply. Sure clear some of the doubts.
    I just start to draw/design in Photoshop and illustrator, I save my files most as PNG, for a transparent background.
    After I went to officework do the poster printing, I found the color of my print image are not as vivid as Mac preview.
    To be precise, the poster I printed looks like has a very thin grey layer, it is not much noticeable, but it indeed lost some vivid color.  As I want to print out my works and keep color as close exact as Mac preview,  here is the issue of coverting RGB CMYK.
    Please feel free to add for below:
    1, Should I set color space in CMYK before drawing in PS/AI 
    2,  in PS, I convert profile from PNG file to CMYK save as psd file,  that psd file preview exactly same as PNG.
    But when saved as PDF, the file preview a bit grey.  Can someone explain this?
    3, Now im thinking, since CMYK is all about printers, it really should be the profession in printing shop who shall check my image, and edit/convert to the right color space to fit their printers.

  • SRGB or Adobe RGB in camera when using Aperture?

    I would appreciate any help I can get with this one:
    Which color space should I use in my D300 (sRGB or Adobe RGB) if I'm using Aperture and why? I'm referring to shooting RAW. Or does color space only matter if I shoot JPEGs? Does it depend on output?
    Thanks,
    Jerry

    It depends on your needs. Adobe RGB is a wider color space so if you're going to do any work with the photo, it will give you a little more flexibility without clipping the colors. But you WILL have to convert it to sRGB before sending to a printer or publishing to the web, if you don't want issues with non-color-aware browsers (which means, pretty much any browser but Safari).
    Still... Aperture makes using RAW as easy as JPEG with numerous benefits so there's little reason to shoot JPEG and use Aperture

  • Rich black when converting RGB to CMYK

    I'm working in an older version of PhotoShop (7) but any help on the topic would definitely help.
    My problem is that I am converting RGB native images to CMYK and my Key (Black) comes out rich, contains equal levels of CMY and K, instead of true black, only k.
    Currently my way around this is to do the standard convert to profile CMYK and with my path selected to the section I would like to be true black simply turn off all CM and Y channels and re-save the image but this is a little labor intensive.
    Is there a way that I can go straight from RGB to CMYK and achieve true black without alteration?

    Yes, there is. You can use a CMYK setup or ICC CMYK profile that uses Maximum black generation. Unfortunately, that will almost always hose anything photographic in your image.
    Is it typographical elements that are becoming four color? If so, then they should be done in a page layout program where they can be rasterized separately from the photographic image. If it is type you're worried about, is it large type or small? If you have to set large type in Ps, then it's probably fine to let it run four color.
    If it were me and I had to do everything in Ps, I would probably make two conversions of the file to CMYK - one with a standard black generation and one with Max K. I would then select the black you want from the max K version and paste into the K channel of the "normal" document, and then use that as a selection to delete from the other three channels.
    A third way is to do type in Ps and leave the type as a vector type layer, then save the file out as a Photoshop PDF, which is then placed in a layout app. or just sent to the printer through his RIP. That should work too, but there are too many places for things to wrong for my taste.

  • How to display data of yuv format without converting rgb in OpenGL ES?

    I have being study about OpenGL ES for iOS.
    I wonder that data of YUV format is can display without converting RGB.
    In most, the yuv data have to convert RGB for display. But, converting process is very slow, Then, that is not display smoothly.
    So, I would like to try to dispaly YUV data without convert to RGB.
    Is it possible? If possible, what can I do?
    Please, let me give a advice.

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

Maybe you are looking for

  • How can I show the full path in terminal?

    By default I only see the current folder How can I toggle it so that I see the full path instead? I say toggle - I'd like to switch on and off Thanks Omar

  • Content open up in the current window

    When I add content in the content area but when I click the link it opens up in the current window s oppose to if it had been URL Link there is an option to open up in current window. As I was searching in metalink I found somebody from Oracle had po

  • Where is my photo library?

    Hi, I am having a problem, when I go to my time machine folders, I clik IPHOTO library, and all I can see is its image, with the 20g of my photos, but no pictures, how can I look for them in my external hd alias TIME Machine?

  • Flash, iWeb, and More, HELP!!!!

    Can anyone help me? I want a website with a homepage that is moving all the time with a film going on in the background. It has music playing too! 2. On the site, i will want "selector buttons" at the bottom of the page. Once a button is selected, th

  • Migrating from Sybase 11 to Oracle 10G : Data not Captured

    Hi, We are working on an interesting customer engagement - one part of the effort is to migrate our Customer's Database. Our Customer is using the Sysbase 11 Database - we are planning to migrate this to Oracle 10G. We are using the latest Migration