5 Replies Latest reply on Aug 23, 2011 5:24 PM by r-bin

    Save as PSD question

    r-bin Level 4

      Hi.

      Does anybody knows how to save doc as PSD with doc.saveAs() command but without compatibility mode to reduce file size?

        • 1. Re: Save as PSD question
          Michael L Hale Level 5

          You can use scriptlistener code to do tha saveAs. The function below with saveAs psd with preview or manimize compatibility.

           

          function saveAsPSD( file ) {// file object
               var desc = new ActionDescriptor();
                  var desc1 = new ActionDescriptor();
                  desc1.putBoolean( stringIDToTypeID('maximizeCompatibility'), false );
              desc.putObject( charIDToTypeID('As  '), charIDToTypeID('Pht3'), desc1 );
              desc.putPath( charIDToTypeID('In  '), file );
                  var list = new ActionList();
                  list.putEnumerated( charIDToTypeID('Prvw'), charIDToTypeID('None') );
              desc.putList( charIDToTypeID('Prvw'), list );
              executeAction( charIDToTypeID('save'), desc, DialogModes.NO );
          };
          
          • 2. Re: Save as PSD question
            r-bin Level 4

            Thanks for reply.

             

            But did youself tried this? Open any jpeg file and use this function to save it as psd.

            This is not working in PS CS2,CS3,CS5.

             

            p.s. sorry for my english.

            • 3. Re: Save as PSD question
              r-bin Level 4

              Sorry i was mistaken. It works as well. But only when a file contains more tthan one layer.

               

              I need to convert a group of jpeg files to psd. So when i will open them in future to edit and make layered they must be saved with noncompatibility mode.

               

              Understand?

              • 4. Re: Save as PSD question
                Michael L Hale Level 5

                r-bin wrote:

                 

                But did youself tried this? Open any jpeg file and use this function to save it as psd.

                Yes I did test the function before I posted it. For me it saves a psd file in CS5. It does so if the document has one layer or many. If I open a jpeg file, this function saves a single layer psd.

                 

                I do not know why it is not working for you.

                • 5. Re: Save as PSD question
                  r-bin Level 4

                  OK. It works and saveAs() function too. I just checked this. But only when a file contains layers or no background.

                   

                  It seems that this is photoshop feature, that when i save flattened PSD it losts its noncompatibility mode.

                  And when i make it layered and save it again, it will be saved then with compatibility mode.

                   

                  It seems that this problem has no solution

                   

                  Sorry to bother you.