Photometry of resolved galaxies. V - NGC 6822