Photometric properties of bars in galaxies