Photoshop: Trim a photo so it contains no transparent pixels?

Solution 1:

Image > Trim then select Based On: Transparent Pixels

Solution 2:

Using CS6, the following does exactly what is required for me:

  1. select crop tool
  2. select 'straighten'
  3. draw along a known straight line
  4. the rotation is performed immediately and a suggested crop appears cutting out all the transparent pixels resulting from the rotation.

result: beautiful!