0 Replies Latest reply on Feb 6, 2012 3:05 PM by uridicystar

    Saving a .rgb (SGI format) file in Extendscript

    uridicystar Level 1

      Hello everyone,

          I'm writing a script in javascript that saves out some .rgb files.  I tried using the

      script listener by selecting Save As in Photoshop.

      However, the resulting script would only save .sgi files:

      var idsave = charIDToTypeID( "save" );

          var desc17 = new ActionDescriptor();

          var idAs = charIDToTypeID( "As  " );

          desc17.putString( idAs, "SGI" );

          var idIn = charIDToTypeID( "In  " );

          desc17.putPath( idIn, new File( "Y:\\lak_temp\\output\\theCoolest.rgb" ) );

          var idCpy = charIDToTypeID( "Cpy " );

          desc17.putBoolean( idCpy, true );

      executeAction( idsave, desc17, DialogModes.NO );

       

      Is there an extra step to tell Photoshop that it needs to use a sub-type of the SGI format?

      I have a plugin from telegraphics that lets me save in the .rgb format.  I imagine this is why I'm having a hard time with it.

       

       

      I also tried using the saveAs() function as mentioned in the documentation,

      but I've had no luck with it on this format:

      var RGBOptions = new SGIRGBSaveOptions();

      RGBOptions.alphaChannels = false;

      RGBOptions.spotColors = false;

       

      app.activeDocument.saveAs(new File( "Y:\\lak_temp\\output\\theCoolest.rgb" ), RGBOptions , false);

       

      I did notice that the save options object didn't pop up any attributes in the Extendscript editor.

      I thought this was wierd, since it popped up suggestions when I use the JPEGSaveOptions object.

       

      I'd appreciate any help.  I'd also be willing to try a javascript library that will convert files to the .rgb format.  I just haven't found one.

      Thanks!