It is a correct way. Some people recommend the Flaming Pear Solidify script for photoshop which essentially does the same thing, but fills the transparent color with the adjacent color. Photoshop defaults transparent colors to white for some reason.