The Trim command automatically eliminates edge pixels of a specific color to quickly refine the edges of an image. To trim an image, follow these steps:
Duplicate the mandrill.psd image again.
Choose Image ’ Trim. The Trim dialog box appears (see Figure 13.17).
Figure 13.17: The Trim dialog box
In the Based on field, click the Top Left or Bottom Right Pixel Color radio button. If the image has a transparent edge that you want trimmed , click the Transparent edge radio button. In the Trim Away field, check all four boxes to trim the entire black rectangular border from all four sides.
Click OK. The entire border is removed, and the image is cropped to a new size .