The Peculiar Motions of Early-type Galaxies in Two Distant Regions. IV. The Photometric Fitting Procedure