Convert cmyk image to grayscale within Illustrator

Now that we can finally change the color of grayscale images, it would be nice to change a cmyk image to grayscale.
EDIT: I just remembered you can with Adjust Color Balance, oops!

1) select all
2) edit -> convert to grayscale

Similar Messages

  • Convert colour images to grayscale images & get pixel data from them

    Is the code below correct to convert colour images to grayscale images in Java?
    public void convertToGrayscale (String sourceName,String destName) throws Exception {
    JPEGImageDecoder decoder=JPEGCodec.createJPEGDecoder(new FileInputStream(sourceName));
    JPEGImageEncoder encoder=JPEGCodec.createJPEGEncoder(new FileOutputStream(destName));
    BufferedImage sourceImg=decoder.decodeAsBufferedImage();
    BufferedImageOp op =new ColorConvertOp(
              ColorSpace.getInstance(ColorSpace.CS_GRAY),null);
         BufferedImage destImg = op.filter(sourceImg,null);
    encoder.encode(destImg);
    decoder = null;
    encoder = null;
    When I get grayscale images from the code below, I would like to access the pixels of those images. So I tried to do:
    byte[] dd=((DataBufferByte)mImage.getRaster().getDataBuffer()).getData();
    BUT the data result array is not 0-255. Could anyone suggest how to obtain pixel data from grayscale images?
    In case that my code shown is not correct or suitable, please give your advice. What I would like to do are in the steps as follows:
    1 change 100*70 jpeg-images to 100*70 grayscale images.
    2 create two dimensional array of pixel data (example [100][70]) from converted images. The number in the array should be between 0-255, right??? And 0 refers to black colour and 255 refers to white colour???
    I am confused about grayscale images. Please help.
    Thank you so much

    I am not sure i understand what is the problem exactly.
    Structure of DataBuffer is described by SampleModel used by same Raster
    object. E.g. it might be 1 byte per xipex or 4 bytes per pixel.
    In your example convertToGrayscale saves images to file as JPEG and
    it seems you later read it back. It is possible what image you read back
    is not greyscale but ARGB and data buffer has different format.
    Technically, if you just need level of grey you may simply
    call getRGB on your output image. Grey is uniform mix of R, G and B.
    Also, instead of ColorConverOp you may dimply create output image of
    grayscale type and draw your color input image with drawImage().
    If none of these helps please try to provide more details.

  • How to convert a CMYK image to pantone in Illustrator

    Is it possible to convert the CMYK raster image to pantone in illustrator.

    On Mon, 12 May 2008 22:37:41 -0700, [email protected] wrote:
    > Is it possible to convert the CMYK raster image to pantone in illustrator.
    I think you meant to post this to the illy group.
    Mike Russell - [advertising link deleted]

  • Converting CMYK to Spot Color (InDesign/Illustrator)

    I have come across a client that have sent files built in process or CMYK.  We want to make it a 2 color job (2 spot colors) but they have not chosen colors.  What is the most effective way to determine the spot color that matches the CMYK procees within InDesign/Ilustrator.  If it easier to do on one of the 2 programs I am completely open to using either.

    You can do it with Photoshop. Click the Foreground color picker, enter the CMYK values, choose Color Libraries, select the Pantone book you want to reference, and the closest ink will be displayed. Keep in mind that the appearance of CMYK depends on the document's color profile or the Color Settings' CMYK Working space if nothing is open. So, for example US Sheetfed Coated will likely return a different Pantone color than US SWOP Coated.

  • CMYK images in single/2 colour layout - how to?

    Using InDesign CS3, 504.
    I'm creating a layout which will be offset printed either single (green and tints thereof) or 2 colour (the green+black and tints thereof) on white stock.  I'm a beginner single/2 colour user, and I'm not sure how I should deal with 4x CMYK images which need to be placed into my layout.  The images are company logos.  All images should be visible below as I inserted them into this post.
    Should they be converted to tints of my single colour?  If so, what's the best way to do that?  And what format should they be?
    Or if the client decides on 2 colours, what should I do?  Convert them to tints of black?  Would that be grayscale?
    Any help much appreciated.

    For a one-color job (technically "monochrome") you have two options. The easiest is ... set your text in black, and leave the images unchanged -- even if it's going to be printed in green! In that case, you should notify your printer the images should not be color separated. He will understand, and his machine will convert them to grayscale. The color comes out of a can, and it does not matter if it's green or black. You should make your own text black, because if you make it green, it will also be converted into a shade of gray.
    The drawback is that you cannot show your client a correct PDF preview (and you might have to repeat this story to him).
    The second option is convert all images to grayscale, using Photoshop (a breeze) or Illustrator (for vectors -- a lot more work). A word of warning: if you use the Photoshop "Convert to gray scale" filter, the actual image still stays RGB or CMYK. Do not forget to physically convert to grayscale in the Image -> Mode menu.
    If you saved the images as grayscale, you can place them as usual in InDesign, and if you need them green, select the open arrow and click on them. InDesign reports its 'color' as Black; you can change it to green using the same swatch as you used for your text.
    Two-color is a lot more work. You still need Photoshop and/or Illustrator, but then you have to manually change some parts to black (/gray) and others to green / a shade of green. You also need to take care only to use the same spot color green as you do in InDesign -- for Photoshop, you need a grayscale image with an added color channel.
    Looking at the logos, it's virtually impossible to change them accurately into just two colors ... (the Acaster one being the exception). Personally, I'd advise a monochromatic approach.

  • Convert color images to black&white bitmaps

    Hi,
    I have black&white scans of public domain books (image format). I use an OCR software to convert them to indexable PDFs (image+text format). However, the OCRed PDFs are insanely big: a 27 MB scanned PDF leads to an indexable PDF of 728 MB! And unfortunately, my OCR software doesn't have output settings, so I have to find a way to compress the files using Adobe Acrobat 9 Pro.
    Using Advanced Options > Optimization does reduce the file size, but not significantly. The problem seems to be that my OCR software converts the black&white scans to color images, and encodes them as such inside the PDF. So I need a way to set the image modes back to black&white. I tried using the Advanced Options > Preflight dialog, and selecting "Convert to black&white". However, the resulting PDFs stay about the same size! It seems that "Convert to black&white" converts the images to grayscale, instead of to bitmap.
    Any help would be appreciated!

    I mentioned "bitmaps", because when I open the original PDF and right-click a random page and select "Modify image..." and open the image in Photoshop, the mode is set to "Bitmap mode": meaning 1-bit mode, containing either black or white pixels. However, when I do "Modify image..." for the OCRed PDF, the mode is set to "RGB Color Mode". I think this explains, in part, the huge size of the OCRed PDF.
    Maybe this table will make it more clear:
    Original PDF (Bitmap Mode, 132 dpi)
    Size: 27 MB
    OCRed PDF (RGB Color Mode, 300 dpi)
    Size: 728 MB
    Now, from the table above, it's clear that I have to reduce the image resolution. So, using the Acrobat's PDF optimizer, I tried the following settings:
    Optimized OCRed PDF: Try 1 (Downsample to 132 dpi, JPEG compression)
    Size: 733 MB
    Optimized OCRed PDF: Try 2 (Downsample to 132 dpi, ZIP compression)
    Size: 449 MB
    But 449 MB is still huge for a single book. And I don't want to reduce the resolution under 132 dpi, because I will loose quality. Clearly, if the original document is just 27 MB, I should be able to squeeze the OCRed document too. But I don't know how.

  • CS2 Convert RGB Images to CMYK Within Illustrator

    Hey everyone. I desparately need some help here. I designed a file in Illustator CS2 and my file had images within it. I took it to a professional printer and he said my images needed to be converted from RGB to CMYK to print properly. The printer had CS4 and he said to change the colours you click on Edit -> then Colours, which in turn allowed him to change the pictures format from RGB to CMYK. I only have CS2 and when he told me to select Edit and then Colours, well CS2 does not have that. It's something completely different.
    If someone out there knows how to change the picture files from RGB to CMYK "within" Illustrator CS2 could you please tell me how as Adobe's phone support only deals with the most current version.
    Any help you can provide me with, would be greatly appreciated!
    Thanks in advance,
    Julie

    >This is for my benefit as I have just purchased a colour laser printer and wanted to be able to print something proper like the professional printer.
    Unless you have a PostScript RIP for your laser printer (a separate driver provided either by your printer manufacturer or a third party) you cannot proof CMYK documents directly. Lacking a PostScript RIP, you can still get a pretty good idea if you have Acrobat. Print to PDF using settings that convert to, say, sRGB... then, print that PDF document on your laser printer (using its native non-PostScript driver).
    For your older documents, if your placed RGB images are embedded (rather than linked), you can try Philip's suggestion. It shouldn't matter, though. Illustrator should do the necessary space conversions at print-time.
    If the images are linked, I would suggest you convert them to CMYK in Photoshop. I'm sorry, but I do not know of a way to do the same thing within Illustrator (v12 aka CS2).

  • CMYK image in a PDF is involuntarily converted to RGB when you send from Acrobat Pro DC to Photoshop for editing

    Hi,
    When I send a CMYK image from Adobe Acrobat Pro DC to Photoshop CC 2014 to be edited, it opens up as RGB in Photoshop CC 2014. If I do the same with Adobe Acrobat XI on another machine, the image opens as CMYK, as it should normally do. As we had created the print-ready PDF in the first place, we know that the image is definitely CMYK and is properly opened in Photoshop if we use Adoba Acrobat Pro XI. We of course can go back to the original document and edit the linked image and re-export a new PDF. But on many occasions we need to do last minute corrections on images by editing them externally in Photoshop.
    Best,
    Refik Telhan

    It's really necessary to know by which program you had created the PDF.
    Here comes a test PDF for questions like yours, created by InDesign:
    http://docs-hoffmann.de/riptest05072013.pdf
    Different images:
    sRGB, pRGB=ProphotoRGB, CMYK , all with individually embedded profile,
    Grayscales: without embedded profiles, because InDesign doesn't embed gray profiles,
    Lab: without profile, because Lab is automatically detected and not ambiguuos.
    Of course, using so many different images in one PDF is useful only for tests.
    An actual test:
    Touch Up Object Grayscale and edit in Photoshop. There is no embedded profile
    but the image is in PS detected as Grayscale. One has to assign a profile.
    Re-imported in the doc, it is a Grayscale JPEG*, before it was a Grayscale ZIP.
    In Acrobat 8 one can check the actual content of a PDF by
    Advanced > Print Production > Preflight
    In newer versions this is still available but somewhere else.
    I'm using version 8, because I uninstalled X on purpose.
    Best regards --Gernot Hoffmann
    *Edited:
    As far as I remember, there is no special code for Grayscale JPEGs, it's just a JPEG
    with zeros in the Cb Cr channels ... like an R=G=B gray image.

  • Convertir une image "Grayscale I16" en "RGB U64"

    Bonjour,
    je cherche depuis un petit moment sur tous les forums que je connais, et je ne trouve pas de réponse à mon besoin, à savoir convertir une image en niveaux de gris de 16 bits en RGB 64 bits. J'ai réussi à le faire en 32 bits, mais la dégradation est trop importante pour mes besoins.
    Si vous avez une solution, je vous en serais reconnaissant.
    Si ça peut vous aider, j'ai Labview 8.6 et NI Vision.
    Merci d'avance

    Si vous souhaitez, voici le VI que j'essaye de faire. 
    Il marche très bien en grayscale 8bits => RGB 32 bits, mais pas en Grayscale 16 bits => RGB 64 bits...
    J'ai supprimé tout le traitement que j'effectue sur l'image pour que ce soit plus lisible. Comme j'effectue divers traitement suivant la couche de l'image (R,G,B), je suis obligé de passer par un Imaq ReplaceColorPlane. 
    Merci du temps que vous consacrez à mon problème.
    Pièces jointes :
    tests.zip ‏217 KB

  • Converting cmyk compressed images to rgb compressed format

    Hi,
    I need some help in converting of CMYK images to RGB images. I got some sample code from internet but I get some run time exceptions with that and I'm not able to figure out the reason for the same. Pls help me in fixing the same. Any help will be sincerely appreicated.
    The code is given below :
    import java.awt.image.*;
    import java.awt.image.renderable.*;
    import java.awt.color.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import javax.media.jai.*;
    import com.sun.image.codec.jpeg.*;
    public class CMYKTest1 {
      public static void main(String args[]) throws Exception{
         RenderedOp op = JAI.create("fileload", "Kristopher Brock LOGO.jpg");
         ColorModel rgbcm = op.getColorModel();
         ICC_Profile profile = ICC_Profile.getInstance("CMYK.pf");
    //     ICC_Profile profile = ICC_Profile.getInstance(ColorSpace.TYPE_CMYK);
         ICC_ColorSpace icp = new ICC_ColorSpace(profile);
         ColorModel colorModel =
              RasterFactory.createComponentColorModel(op.getSampleModel().getDataType(),
                                                                icp,
                                                                false,
                                                                false,
                                                                Transparency.OPAQUE);
         ImageLayout il = new ImageLayout();
         il.setSampleModel(colorModel.createCompatibleSampleModel(op.getWidth(),
                                                                                op.getHeight()));
         RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, il);
         ParameterBlock pb = new ParameterBlock();
         pb.addSource(op).add(colorModel);
         op = JAI.create("ColorConvert", pb, hints);
         pb = new ParameterBlock();
         pb.addSource(op).add(rgbcm);
         il = new ImageLayout();
         il.setSampleModel(rgbcm.createCompatibleSampleModel(op.getWidth(),
                                                                          op.getHeight()));
         hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, il);
         op = JAI.create("ColorConvert", pb, hints);
         JAI.create("filestore", op, "earthrgb.jpg", "JPEG", null);
         BufferedImage img = op.getAsBufferedImage(null, null);
         OutputStream fout = new FileOutputStream("earthrgb1.jpg");
         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fout);
         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);
         param.setQuality(1, false);
         param.setXDensity(300);
         param.setYDensity(400);
         encoder.encode(img, param);
         fout.close();
    }I get the following error:
    Caused by: java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
         at java.awt.image.ColorConvertOp.filter(Unknown Source)
         at com.sun.media.jai.opimage.ColorConvertOpImage.computeRectNonColorSpaceJAI(ColorConvertOpImage.java:373)
         at com.sun.media.jai.opimage.ColorConvertOpImage.computeRect(ColorConvertOpImage.java:290)
         at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:914)
         at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
         at javax.media.jai.OpImage.getTile(OpImage.java:1129)
         at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:911)
         at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
         at javax.media.jai.OpImage.getTile(OpImage.java:1129)
         at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:173)
         at com.sun.media.jai.opimage.EncodeRIF.create(EncodeRIF.java:70)
         ... 24 more
    Error: One factory fails for the operation "filestore"
    Occurs in: javax.media.jai.ThreadSafeOperationRegistry
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
         at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
         at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
         at javax.media.jai.JAI.createNS(JAI.java:1099)
         at javax.media.jai.JAI.create(JAI.java:973)
         at javax.media.jai.JAI.create(JAI.java:1668)
         at CMYKTest1.main(CMYKTest1.java:79)
    Caused by: javax.media.jai.util.ImagingException: All factories fail for the operation "encode"
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
         at com.sun.media.jai.opimage.FileStoreRIF.create(FileStoreRIF.java:138)
         ... 15 moreThanks & Regards,
    Magesh.

    The following code converts an cmyk jpeg image into an rgb jpeg image.
    The only problem if this code is that it loads the whole image in memory and thus you'll need a lot of RAM when converting large images. For example, it take around 300 MB to convert a 3000*3800px image (this is a 5MB jpeg image when compressed on disk).
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGEncodeParam;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    import javax.imageio.metadata.IIOMetadata;
    import javax.imageio.metadata.IIOMetadataNode;
    import java.util.*;
    import java.io.*;
    import java.awt.image.*;
    import java.awt.*;
    import java.awt.color.ColorSpace;
    import org.w3c.dom.NodeList;
    public class Test {
        public static void main(String[] args) throws Exception {
            BufferedImage i1 = readImage(new File("cmyk.jpg"));
            BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(new File("rgb.jpg")));
            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
            JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(i1);
            param.setQuality(1, false);
            encoder.setJPEGEncodeParam(param);
            encoder.encode(i1);
        public Test() {
        // extract metadata
        public static BufferedImage readImage(File file) throws IOException {
            // Get an ImageReader.
            ImageInputStream input = ImageIO.createImageInputStream(file);
            Iterator readers = ImageIO.getImageReaders(input);
            if (readers == null || !readers.hasNext()) {
                throw new RuntimeException("No ImageReaders found");
            ImageReader reader = (ImageReader) readers.next();
            reader.setInput(input);
            String format = reader.getFormatName();
            if ("JPEG".equalsIgnoreCase(format) || "JPG".equalsIgnoreCase(format)) {
                IIOMetadata metadata = reader.getImageMetadata(0);
                String metadataFormat = metadata.getNativeMetadataFormatName();
                IIOMetadataNode iioNode = (IIOMetadataNode) metadata.getAsTree(metadataFormat);
                NodeList children = iioNode.getElementsByTagName("app14Adobe");
                if (children.getLength() > 0) {
                    iioNode = (IIOMetadataNode) children.item(0);
                    int transform = Integer.parseInt(iioNode.getAttribute("transform"));
                    Raster raster = reader.readRaster(0, reader.getDefaultReadParam());
                    if (input != null) {
                        input.close();
                    reader.dispose();
                    return createJPEG4(raster, transform);
            throw new RuntimeException("No ImageReaders found");
         * Java's ImageIO can't process 4-component
         * images
         * <p/>
         * and Java2D can't apply AffineTransformOp
         * either,
         * <p/>
         * so convert raster data to
         * RGB.
         * <p/>
         * Technique due to MArk
         * Stephens.
         * <p/>
         * Free for any
         * use.
        private static BufferedImage createJPEG4(Raster raster, int xform) {
            int w = raster.getWidth();
            int h = raster.getHeight();
            byte[] rgb = new byte[w * h * 3];
            // if (Adobe_APP14 and transform==2) then YCCK else CMYK
            if (xform == 2) {    // YCCK -- Adobe
                float[] Y = raster.getSamples(0, 0, w, h, 0, (float[]) null);
                float[] Cb = raster.getSamples(0, 0, w, h, 1, (float[]) null);
                float[] Cr = raster.getSamples(0, 0, w, h, 2, (float[]) null);
                float[] K = raster.getSamples(0, 0, w, h, 3, (float[]) null);
                for (int i = 0, imax = Y.length, base = 0; i < imax; i++, base += 3) {
                    float k = 220 - K, y = 255 - Y[i], cb = 255 - Cb[i], cr = 255 - Cr[i];
    double val = y + 1.402 * (cr - 128) - k;
    val = (val - 128) * .65f + 128;
    rgb[base] = val < 0.0 ? (byte) 0 : val > 255.0 ? (byte) 0xff : (byte) (val + 0.5);
    val = y - 0.34414 * (cb - 128) - 0.71414 * (cr - 128) - k;
    val = (val - 128) * .65f + 128;
    rgb[base + 1] = val < 0.0 ? (byte) 0 : val > 255.0 ? (byte) 0xff : (byte) (val + 0.5);
    val = y + 1.772 * (cb - 128) - k;
    val = (val - 128) * .65f + 128;
    rgb[base + 2] = val < 0.0 ? (byte) 0 : val > 255.0 ? (byte) 0xff : (byte) (val + 0.5);
    else {
    // assert xform==0: xform;
    // CMYK
    int[] C = raster.getSamples(0, 0, w, h, 0, (int[]) null);
    int[] M = raster.getSamples(0, 0, w, h, 1, (int[]) null);
    int[] Y = raster.getSamples(0, 0, w, h, 2, (int[]) null);
    int[] K = raster.getSamples(0, 0, w, h, 3, (int[]) null);
    for (int i = 0, imax = C.length, base = 0; i < imax; i++, base += 3) {
    int c = 255 - C[i];
    int m = 255 - M[i];
    int y = 255 - Y[i];
    int k = 255 - K[i];
    float kk = k / 255f;
    rgb[base] = (byte) (255 - Math.min(255f, c * kk + k));
    rgb[base + 1] = (byte) (255 - Math.min(255f, m * kk + k));
    rgb[base + 2] = (byte) (255 - Math.min(255f, y * kk + k));
    // from other image types we know InterleavedRaster's can be
    // manipulated by AffineTransformOp, so create one of
    // those.
    raster = Raster.createInterleavedRaster(new DataBufferByte(rgb, rgb.length), w, h, w * 3, 3, new int[]{0, 1, 2}, null);
    ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
    ColorModel cm = new ComponentColorModel(cs, false, true, Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
    return new BufferedImage(cm, (WritableRaster) raster, true, null);

  • How can I package my InDesign file without converting the images to CMYK?

    I had previously thought I have to convert each link individually, but I have received packaged files that include both RGB and CMYK images, but when I try to package my document, it is saying that I have errors on all the RGB images. Are there settings that allow me to package the links without conversion? I know how to export it with a one-time conversion, but I cannot find the answer to this question anywhere.

    Thank you for helping! I must be doing something else wrong then because it will stop packaging as soon as it tries to get the links... and will gather a few and then stop. The warning message is "could not copy linked files" but I don't have any warning signs on any of my links in the links panel...

  • Preserving alpha while converting images to grayscale

    I am trying to convert images into grayscale.
    I use this code
    public static BufferedImage grayScale(BufferedImage im) {
            BufferedImage image = new BufferedImage(im.getWidth(), im.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
            Graphics g = image.getGraphics();
            g.drawImage(im, 0, 0, null);
            g.dispose();
            return image;
        }but transparent parts become black. Is there a simple way to preserve opacity while converting to grayscale.

    Since you want to preserve the alpha channel you'll need to get and set the pixels yourself. And you'll have to use a BufferedImage type that
    supports an alpha channel. TYPE_BYTE_GRAY won't do...
    public static BufferedImage grayScale(BufferedImage im) {
         BufferedImage grayImage = new BufferedImage(im.getWidth(), im.getHeith(), BufferedImage.TYPE_INT_ARGB);
         for(int x = 0; x < im.getWidth(); x++)
              for(int y = 0; y < im.getHeight(); y++){
                   int argb = im.getRGB(x,y);
                   int a = (argb >> 24) & 0xff;
                   int r = (argb >> 16) & 0xff;
                   int g = (argb >>  8) & 0xff;
                   int b = (argb      ) & 0xff;
                   int l= (int) (.299 * r + .587 * g + .114 * b) //luminance
                   grayImage.setRGB(x,y, (a << 24) + (l << 16) + (l << 8) + l);
         return grayImage;
    }

  • I just purchased photos from shutterstock and they said it will download as .eps file. They said I would need vector editor such as adobe illustrator to convert the image to a jpeg. Could anyone advise me how to do this? This is all very foreign to me. Th

    I just purchased photos from shutterstock and they said it will download as a .eps file.They said I would need vector editor such as adobe illustrator to convert the image to a jpeg. Could anyone advise me on how to do this? This is all very foreign to me.
    The Swanky Lady

    File>Open to open your eps file
    File>Export to export your image as a jpg.
    In the export dialog box just below where you type in the filename is a file type, that is where you choose jpg.
    What ever you do, do not delete the eps file. Should you ever need to access the original you will have have.
    I recommend that instead of jpg you choose psd, tiff, or png and use jpg only for sharing. Jpg is a lossy format meaning each time you edit the file and save it, the quality of that file degrades. The formats I recommend are lossless formats, you can edit them all you want no data is being discarded unless you choose to do so.

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • CMYK shadow to Grayscale in a layered file...

    Here is the scenario:
    CMYK image (say like an iPod), is in a layered file with a grayscale drop shadow on a second layer.
    Image was converted to RGB for web.
    Now the image needs to be converted back to CMYK, but the drop shadow is no longer grayscale after the RGB convert, it is now a CMYK build-up, which is a big problemo in printing.
    How can I change the shadow within the file back to grayscale? I know about converting layers to smart objects, but when it pulls out the layer and I convert to grayscale and save it...it is still a CMYK build in the file.
    Any ideas? Im stumped. :)

    I never do this, but here is a thought... store the grayscale drop
    shadow as a separate image so that you can replant it after the RGB work.
    Cheers

Maybe you are looking for

  • How to display the Page Numbers in AP Check Print Report

    Hi I am using <?for-each@section:G_CHECKS?> at form field. But It did not works for me. Please guide me inthis regard. Thanks Namitha

  • SDK install problems on Redhat 7.1

    Hi I'm having problems getting the SDK to work on Redhat 7.1. My path variable is set up corectly, and get the following errors when I do a java -version java: /usr/bin/cut: No such file or directory usr/lib/jdk1.3.0_02/bin/i386/native_threads/java:

  • I need to know the application ID for Speech Feedback.

    I have a problem, the speech feedback icon is in my window after I used it for a while. I went to system preferances and turned speech feedback off. The icon did not disappear. I have tried right clicking for options but nothing happened. I also look

  • IPhone 4 charging but doesn't show signs of charging and wont connect to windows pc

    Hi. I tried to charge my iPhone 4 today however it didn't appear to be charging. I tried different cables, chargers, computers, turning the phone on and off - including holding the home button and lock button down simulationsly, but still wouldn't wo

  • Craig cmehil impostor?

    is there an impostor currently posting comments in the blog section under craig cmehil's name or is the real craig just veeery grumpy today?