1 Reply Latest reply on Jun 16, 2016 9:31 AM by Tom Ruark

    Photoshop scripting VBscript

    uselesshippy

      I'm trying to write a vbscript to open an image, convert it to Indexed Colour and save it.

       

      When I try and convert to indexed colour using docRef.ChangeMode(6) I get an error saying that it needs conversion options, but I can't find what these need to be or how to set them.

       

      Can anyone help?

       

      Thanks

        • 1. Re: Photoshop scripting VBscript
          Tom Ruark Adobe Employee

          In JavaScript you can just use the defaults like this:

                var cnvtOpts = new IndexedConversionOptions();

                doc.changeMode(ChangeMode.INDEXEDCOLOR, cnvtOpts);

           

          You can modify from the defaults by setting any of these values before sending it to changeMode.

           

          Palette

          -- PaletteType

           

          Colors

          -- long

           

          Forced

          -- ForcedColors

           

          Transparency

          -- boolean

           

          Dither

          -- DitherType

           

          DitherAmount

          -- long

           

          PreserveExactColors

          -- boolean

           

          Matte

          -- MatteType