How I can change bit depth of a image with ffmpeg? [closed]

ffmpeg might not be the best tool here; imagemagick should be better suited to this purpose. Its -depth option should be what is needed.

If for any reason ffmpeg has to be used, the pix_fmt option or the format filter might be of help.