img2if: add support for more image formats
img2if: fix usage message
img2if: flush stdout when finished