Current Position:Home > RGB/CMYK to Grayscale by script or right click?

RGB/CMYK to Grayscale by script or right click?

Update:11-30Source: network consolidation
Advertisement
Is there a way to convert RGB/CMYK to Grayscale by script?
I need to convert 475 images to grayscale. But I can´t use Color2Gray plugin into Indesign for erros message - I don´t know why.
I know there is another method in Indesign to make it (menu Effect...) but cause troubles in out.
Maybe there is a script like right click into Windows Explorer but I don't know anyone.

The Best Answer

Advertisement
Here is my first attempt :
#target indesign
var doc = app.activeDocument,
links = doc.links,
i, link, image;
UpdateAllOutdatedLinks();
for (i = links.length-1; i >= 0; i--) {
     link = links[i];
     if (link.status == LinkStatus.NORMAL) {
          image = link.parent;
          if (image.space == "RGB" || image.space == "CMYK") {
               CreateBridgeTalkMessage(link.filePath);
UpdateAllOutdatedLinks();
//===================== FUNCTIONS ===============================
function CreateBridgeTalkMessage(imagePath) {
     var bt = new BridgeTalk();
     bt.target = "photoshop";
     bt.body = ResaveInPS.toSource()+"("+imagePath.toSource()+");";
     bt.onError = function(errObj) {
          $.writeln("Error: " + errObj.body);
     bt.onResult = function(resObj) {}
     bt.send(30);
function ResaveInPS(imagePath) {
     var psDoc;
     app.displayDialogs = DialogModes.NO;
     psDoc = app.open(new File(imagePath));
     psDoc.changeMode(ChangeMode.GRAYSCALE);
     psDoc.close(SaveOptions.SAVECHANGES);
     app.displayDialogs = DialogModes.ALL;
function UpdateAllOutdatedLinks() {
     var link, c;
     for (var c = doc.links.length-1; c >= 0; c--) {
          link = doc.links[c];
          if (link.status == LinkStatus.LINK_OUT_OF_DATE) link.update();
Written in CS3, Windows.
  • RGB/CMYK to Grayscale by script or right click? Update:11-30

    Is there a way to convert RGB/CMYK to Grayscale by script? I need to convert 475 images to grayscale. But I can´t use Color2Gray plugin into Indesign for erros message - I don´t know why. I know there is another method in Indesign to make it (menu Ef

  • RGB CMYK PDF EXPORT.(colour conversion)  Keeping your colours vibrant and your blacks black. Update:10-11

    Ive been tearing my hair out for the best part of 14 hours trying to figure out how to keep the closest possible conversion for working with images(rgb in photoshop) right the way through a work flow until exporting to print (having used the image in

  • Why does spot EPS not output when converted to CMYK or grayscale? Update:10-11

    Apologies if this is a known issue but I can't find it anywhere... I'm using AI CS3 (13.0.2) on an Intel iMac/Os 10.5.4 and I can't figure out why a white logo made from text outlines outputs fine to PDF if I use a spot color but if I change it to gr

  • Distiller X vs. Distiller 8/9 RGB - CMYK conversion Update:10-11

    1) I have a simple EPS file (that I created in CorelDraw, but I get the same results with other software, too) that contains a single RGB red (r = 255, g = 0, b = 0) square. 2) I open Acrobat Distiller, set it to use the PDF/A-1b:2005 (CMYK) joboptio

  • RGB, CMYK, rotated pages, and PDF error Update:10-11

    This is a weird one. I have a FM 9 file. It's a chapter within a book. It has both portrait and landscaped pages. If I "Save as PDF" from FM 9, and do not check "Convert CMYK colors to RGB," the landscaped pages do not rotate to landsc

  • Why different values in Illustrator/InDesign/PS when converting Pantone to RGB & CMYK? Update:10-11

    I'm starting off with a pantone color in InDesign and trying to determine a close and consistent approximation of RGB, CMYK, and Hex. When I do this conversion in InDesign, I get different results than if I do it in Photoshop or Illustrator. I have a

  • If you change the image mode of this image from 8-bit RGB image to Grayscale mode while in PSCS – what will the new Pixel Count be? Update:10-11

    If you change the image mode of this image from 8-bit RGB image to Grayscale mode while in PSCS – what will the new Pixel Count be?If you mean by Pixel count the number of pixels, this will not change. The image will have the same size thus the same

  • RGB / CMYK Color Space View Update:11-30

    This might be a really basic question, but can anyone tell me how I can toggle between the "RGB Color Space View" and "CMYK Color Space View" in the color picker menu box? Thanks.To the best of my knowledge, there is no CMYK Color Spac

  • RGB/CMYK/Lab values like Photoshop «Info» palette Update:11-30

    Hello. How can we do that when moving the cursor over an image in a some window/place showing the current values RGB/CMYK/Lab as «Info» palette in PhotoShop? Thanks.>And the RGB readouts are based on the LR working space. That's not true. The RGB rea

  • CMYK or Grayscale objects/text? Update:11-30

    I'm working on this flyer in Ilustrator. It has a photo that I will edit in PS, do I use the b/w mode and cmyk in PS or do I simply use the grayscale in PS? There are CMYK (colored objects) on the flyer. Can I mix CMYK and Grayscale objects when prin