21 Replies Latest reply on Feb 1, 2013 8:59 AM by Kurt Lang

    Issue with Save for Web in an Action

    Kurt Lang Level 1

      We do hundreds of images for our main client for print purposes. As part of the work, they want all of the final images run through Save for Web saved as both a .jpg and .png file at 1000 pixels wide.

       

      The problem is, if you try to create an action for this, the size the action saves is a percentage and not a pixel width. So it's impossible (so it seems) to save an action that sets the scale as a proportional resize with a fixed output of 1000 pixels wide. Since all of the images vary in size and it insists on saving the size as a percentage, you can't create an action that will work.

       

      I've tried to see if there's a way to modify the action to change the output to a pixel width, but can't see how to do it. Is this even possible? It would save us TONS of work not having to manually open each image twice and saving for each format.

        • 1. Re: Issue with Save for Web in an Action
          conroy Level 5

          An Action can use Image Size command to resize the document to 1000 pixels wide then do Save For Web without further scaling.

          1 person found this helpful
          • 2. Re: Issue with Save for Web in an Action
            Kurt Lang Level 1

            Haha! Fer' criminy's sake, why didn't that cross my mind? Thanks.

             

            Next question then to finish the action is a do this if that. Some images are smaller than 1000 px in the width. For those images, the client doesn't want them scaled up to 1000 px, but left where they are. Can you think of a way for the action to skip scaling the image if it's less than a 1000 px wide before calling the Save for Web output?

            • 3. Re: Issue with Save for Web in an Action
              conroy Level 5

              I understand that Ps 13.1.x (i.e. Cloud-only at this point in time) has conditional steps for Actions. Maybe image width or height can be a condition. I don't know for sure because I'm a second-class user with a perpetual licence. If you don't have 13.1.x then I guess you could ask for a solution in the Ps scripting forum.

              1 person found this helpful
              • 4. Re: Issue with Save for Web in an Action
                Kurt Lang Level 1

                I don't know for sure because I'm a second-class user with a perpetual licence.

                Same here. I want, no - need my software here. Not where I can't get at if my Internet connection goes down. Fat lot of good the software would do me if I can't launch it.

                • 5. Re: Issue with Save for Web in an Action
                  Kurt Lang Level 1

                  Ah! Found the solution in another thread. You use the Fit Image command under Automate. There you set a pixel height or width you want, and then check the box for Don't Enlarge.

                   

                  Both values are fixed, so you have to use a bogus number for one size or the other to allow your preferred value to work. So for my case, I set the width to 1000, and the height to 10,000. The oversized height number prevents the step from scaling to a size larger than 1000 px in the width when the height would fall below too small of a value. By setting the height to 10,000, everything I resize will always come down to 1000 px width, but never up with the box checked.

                  1 person found this helpful
                  • 6. Re: Issue with Save for Web in an Action
                    Kurt Lang Level 1

                    Well, it would work if the Fit Image command would quit ignoring the Don't Enlarge check box. It enlarges smaller files anyway.

                    • 7. Re: Issue with Save for Web in an Action
                      conroy Level 5

                      Fit Image does seem to work correctly for me (13.0.1 on OS X 10.6.8). The Action shown below does honour the enabled Don't Enlarge option when run in a Batch with a test folder of documents.

                       

                      1600 x 2000 becomes 1000 x 1250

                      2000 x 1600 becomes 1000 x 800

                      640 x 800 remains 640 x 800

                      800 x 640 remains 800 x 640

                       

                      Screen shot 2013-01-28 at 23.44.33.png

                      • 8. Re: Issue with Save for Web in an Action
                        Kurt Lang Level 1

                        13.0.4 here, also on 10.6.8. Not working as expected. With Don't Enlarge on, smaller images scale up anyway.

                        • 9. Re: Issue with Save for Web in an Action
                          conroy Level 5

                          Sounds like a bug introduced after 13.0.1 then.

                          • 10. Re: Issue with Save for Web in an Action
                            Kurt Lang Level 1

                            Drat! Yeah, it looks that way. I pulled the Fit Image script out of the 13.0.0 installer and temporarily replaced the one in 13.0.4. No change. Reading through the script, Don't Enlarge is mentioned once as:

                             

                            /limit [($$$/AdobePlugin/FitImage/limit=Don't Enlarge) /boolean]

                             

                            There are no other references in the script, so it appears to be calling an outside parameter. I even took the preferences out of my account so PS would run with the defaults, thinking maybe it wasn't updating something in the prefs. No change there either, other than the height and width values going back to the defaults. However, that does mean the numbers are being saved in the prefs, so it could be that PS isn't writing the Don't Enlarge change?

                            • 11. Re: Issue with Save for Web in an Action
                              Kurt Lang Level 1

                              Took a long look at the problem the last couple of days. It's not related to any particular update to PS CS6, it's just a flaw with how Fit Image works. I'm using Snow Leopard as my day to day OS, but am slowly working my way into Mountain Lion since I have newer apps that require Lion or newer to run. So as part of this hunt, I finally installed the CS6 Master Collection onto the ML drive (10.8.2). This was a clean install of ML on an erased drive, and no previous Adobe software. So it's all squeaky clean software. All updates applied to the OS and the Adobe suite.

                               

                              I did try Fit Image one update at a time with PS. Went from 13.0 to 13.0.1 and tested; to 13.02 and tested again; repeat up to 13.0.4. In all cases, it's an issue with how fit image tries to determine what to do, because it has to deal with both height and width. As a test, create a file 500 px wide, and 600 tall. Now call up Fit Image and make the width 1000 and the height 600. Check the box for Don't Enlarge. Nothing will happen. Run it again and change the height to 1200. This time is scales up, regardless of the check box.

                               

                              Since the client images fall all over the place as far as height and width, that makes this function basically useless since you can't restrict how it tries to figure out whether or not to scale the image by only determining one dimension. If you could enter only the width and have it ignore the height for instance, then it would work correctly every time. The function wouldn't have to guess at what you want done since it wouldn't have what is essentially conflicting instructions.

                               

                              Of course, it would be nice if owners of perpetual licenses weren't being treated like second class customers and we had all of the same features users of CS6 subscription do. I'd sure like so hear why Adobe decided perpetual users didn't get all of the same features for the same software. I'm pretty sure my money was good, too. One of my clients did say Adobe is going to get all of the extra stuff into the perpetual version of CS6, but didn't know when. Once I can use a conditional step in an action for Image Size to skip the process when the image width is under 1000 px, then the problem will be solved.

                              • 12. Re: Issue with Save for Web in an Action
                                conroy Level 5

                                Kurt Lang wrote:

                                 

                                Took a long look at the problem the last couple of days. It's not related to any particular update to PS CS6, it's just a flaw with how Fit Image works. I'm using Snow Leopard as my day to day OS, but am slowly working my way into Mountain Lion since I have newer apps that require Lion or newer to run. So as part of this hunt, I finally installed the CS6 Master Collection onto the ML drive (10.8.2). This was a clean install of ML on an erased drive, and no previous Adobe software. So it's all squeaky clean software. All updates applied to the OS and the Adobe suite.

                                 

                                I did try Fit Image one update at a time with PS. Went from 13.0 to 13.0.1 and tested; to 13.02 and tested again; repeat up to 13.0.4. In all cases, it's an issue with how fit image tries to determine what to do, because it has to deal with both height and width. As a test, create a file 500 px wide, and 600 tall. Now call up Fit Image and make the width 1000 and the height 600. Check the box for Don't Enlarge. Nothing will happen. Run it again and change the height to 1200. This time is scales up, regardless of the check box.

                                 

                                 

                                 

                                No problem here with 13.0.1 on OS X 10.6.8. It correctly doesn't scale up when I have enabled "Don't Enlarge".

                                • 13. Re: Issue with Save for Web in an Action
                                  Kurt Lang Level 1

                                  That is just bizarre. I thought at first it might be a Snow Leopard related issue. After setting up CS6 on Mountain Lion, I checked every point upgrade of PS. In each case, Fit Image didn't work. I also tried a test account in SL to see if it was preference related to an account. Same thing there. Depending on the size of the image you were starting with and the numbers you entered into Fit Image, sometimes the image scaled up against the rule of the check box, and others didn't. Some also scaled smaller than the 1000 px width if the height image was smaller. Kind of what you would expect there, but that again makes it impossible to control in only one direction.

                                  • 14. Re: Issue with Save for Web in an Action
                                    Paul Riggott Level 6

                                    Yes there is a bug with that script.

                                    The bug got in CS5 and was not fixed in CS6.

                                    You can download the fixed script here...

                                    http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3370

                                    • 15. Re: Issue with Save for Web in an Action
                                      Kurt Lang Level 1

                                      Yes!!! That did it. Wish I could give you a Solved rather than a Helpful.

                                      • 16. Re: Issue with Save for Web in an Action
                                        conroy Level 5

                                        I wonder why I have no problem without downloading a script. I've been following your examples and have been unable to get an error on any occasion.

                                         

                                        Edit: Aha! All my attempts have been with 72 ppi docs, which is the only resolution with which the standard script is reliable.

                                        • 17. Re: Issue with Save for Web in an Action
                                          PECourtejoie Adobe Community Professional

                                          Kurt, I changed it for you.

                                          • 18. Re: Issue with Save for Web in an Action
                                            Kurt Lang Level 1

                                            Edit: Aha! All my attempts have been with 72 ppi docs, which is the only resolution with which the standard script is reliable.

                                            I never would have guessed that one. Good catch!

                                            Kurt, I changed it for you.

                                            VERY much appreciated. I did look through the original script, but didn't have enough knowledge about it to quite know what I was looking for. Makes my job tons easier and 10 times faster for that part of the process. I had set up an action each for .png and .jpg images using Image Size and then Save for Web, but then I had to first sort out the ones that were smaller than 1000 px wide before running the actions. With a fixed script, I can do all of them at once. Yahoo!

                                            • 19. Re: Issue with Save for Web in an Action
                                              Kurt Lang Level 1

                                              Taking a cue from conroy's discovery, you can "fix" the problem by running your action slightly differently using the original script (for those who are uncomfortable downloading a modified script).

                                               

                                              Image Size - resample off - set res to 72 dpi

                                              Fit Image - to your desired size

                                              Save for Web

                                              • 20. Re: Issue with Save for Web in an Action
                                                conroy Level 5

                                                Oh, I can't take credit for a discovery. I read the information on the page to which Paul posted a link.

                                                • 21. Re: Issue with Save for Web in an Action
                                                  Kurt Lang Level 1

                                                  Be greedy, do it anyway.