12 Replies Latest reply on Feb 4, 2017 1:32 PM by Trevor.Dennis

    Why not allow a tolerance for trim?

    ed3333 Level 1

      I suppose this is half question half feature request.  Why not have a tolerance for trim rather than only 1 pixel top left/bottom right?

       

      I need to trim the borders from images of varying dimensions.  Unless I'm missing something the only ways are cropping with a steady hand, or fiddling with the magic wand > trim transparent pixels.  Just extra steps.

        • 1. Re: Why not allow a tolerance for trim?
          JJMack Most Valuable Participant

          Because you just need to use trim twice when all four do not have same color on all four edged using those two point can trim up three sides.  If all four sides have the same color you only need to use the tool once.

          Capture.jpg

          Most time one use is all that is required some cases require two.

          Capture.jpg

          • 2. Re: Why not allow a tolerance for trim?
            ed3333 Level 1

            Not sure I understand your solution.  For example, I have a jpeg of a photo with a black border around it.  It will only allow me to trim once, presumably because the entire border isn't a single shade of black.

            • 3. Re: Why not allow a tolerance for trim?
              JJMack Most Valuable Participant

              Trim will trim off a particular color to the bounds of an objects or trim off transparency.  You can limit the trim to particular image sides.  It can not trim a range of colors.  To do that you would need to select the Object you want to trim to, invert that selection and clear the inverted selection. Then you can trim off the transparency.,

              • 4. Re: Why not allow a tolerance for trim?
                Trevor.Dennis Adobe Community Professional

                ed3333 wrote:

                 

                Not sure I understand your solution. For example, I have a jpeg of a photo with a black border around it. It will only allow me to trim once, presumably because the entire border isn't a single shade of black.

                You can use negative values for Canvas.  This would remove one pixel from each side.

                And this would remove one pixel from the left and bottom edges

                • 5. Re: Why not allow a tolerance for trim?
                  ed3333 Level 1

                  JJMack wrote:

                   

                  Trim will trim off a particular color to the bounds of an objects or trim off transparency. You can limit the trim to particular image sides. It can not trim a range of colors. To do that you would need to select the Object you want to trim to, invert that selection and clear the inverted selection. Then you can trim off the transparency.,

                   

                  Right - hence my original question. 

                  • 6. Re: Why not allow a tolerance for trim?
                    ed3333 Level 1

                     

                    You can use negative values for Canvas. This would remove one pixel from each side.

                     

                    And this would remove one pixel from the left and bottom edges

                    Forgot to mention border thickness varies on each side so this won't work.

                    • 7. Re: Why not allow a tolerance for trim?
                      JJMack Most Valuable Participant

                      IMO what you want to do makes little sense it would take just a single pixel out of tolerance in the area you would like to trim off  to produce a crop you have no desire for. Your are better off using the crop tool. Then trying to use some tolerance that you have no idea of what will eventually be trimmed off.

                      • 8. Re: Why not allow a tolerance for trim?
                        ed3333 Level 1

                        JJMack wrote:

                         

                        IMO what you want to do makes little sense it would take just a single pixel out of tolerance in the area you would like to trim off to produce a crop you have no desire for. Your are better off using the crop tool. Then trying to use some tolerance that you have no idea of what will eventually be trimmed off.

                        Not if trim has a "preview" (like so many other tools). It could show you what will be trimmed with the default tolerance, which you can adjust.  It wouldn't add any extra steps that would make trim more cumbersome to use.

                         

                        Take this example:

                         

                        example.png

                         

                        Because of those artifacts, trim would only work once.  As you say, I could use the crop tool.  But unless there's some crop functionality I'm unaware of, I would have to carefully draw the crop around the red rectangle.

                         

                        I could also use the wand, adjust tolerance, delete, then navigate to trim (transparency) but that's extra steps and 2 tools.  I'd rather trim, tolerance, delete in 1 tool.

                         

                        Perhaps I'm just splitting hairs here but looking at the 60 images ahead of me any time saver is welcome.

                        • 9. Re: Why not allow a tolerance for trim?
                          Conrad C Adobe Community Professional & MVP

                          I sometimes have to trim the drop shadow off of screen shots where the drop shadow is different widths on different sides. To make this easier, I created Actions in Photoshop that use the Canvas Size negative values method above.

                           

                          For example, one action trims one pixel off of the left side by using a -1 pixel Width value anchored to the right. I made four of those actions so I can trim any side in one click. Two other actions take a pixel off of both the top and bottom or left and right, using a -2 pixel Width or Height value anchored to the center. Another action trims all four sides using -2 Width and -2 Height.

                           

                          Once the actions are built, when a graphic comes through that needs to be trimmed I just click the actions that trim the sides that need it. If I need 3 pixels off of the left side, I play that action three times and it's done in 3 clicks. Of course, you can customize the increments if you want.

                          • 10. Re: Why not allow a tolerance for trim?
                            JJMack Most Valuable Participant

                            If your example was a typical common image which is it not. Object are not typically one color and rectangular.  Object have more complex shapes many colors. If you replace your red rectangle with a typical  complex multi color shaped object. It would be very possible that your tolerance trim could crop away part of the object. In any case a crop will be  a rectangle and the object will still have a black background with gray rectangles.

                            1 person found this helpful
                            • 11. Re: Why not allow a tolerance for trim?
                              JJMack Most Valuable Participant

                              Conrad C wrote:

                               

                              I sometimes have to trim the drop shadow off of screen shots where the drop shadow is different widths on different sides. To make this easier, I created Actions in Photoshop that use the Canvas Size negative values method above.

                              I just do a select all with any select tool active then use the arrow keys to nudge the selection the number of pixels to get the shadows outside the selection. Then do an image crop. No action needed and any size shadows can be cropped away.

                              • 12. Re: Why not allow a tolerance for trim?
                                Trevor.Dennis Adobe Community Professional

                                ed3333 wrote:

                                 

                                 

                                You can use negative values for Canvas. This would remove one pixel from each side.

                                 

                                And this would remove one pixel from the left and bottom edges

                                Forgot to mention border thickness varies on each side so this won't work.

                                I made a mistake with my screen grab btw.  The first one should have shown '-2' for each side, and not '2'.

                                You could use Canvas one side at a time.

                                 

                                This represents as bad a case as you are likely to encounter, with tiny slithers on an angle.

                                You could use the crop tool while zoomed in, together with the Ctrl key to enable fine adjustments near the border.

                                Or drag out some guides to mark the bad edges (while zoomed in).

                                Make selection that snaps to those guides.

                                And Image > Crop