The xscanimage front end to SANE will produce files in an appropriate PNM format (PBM for black-and- white images, PGM for grayscale images, and PPM for color images), unless it's used as a GIMP plug-in. In that case it just passes the image to GIMP and lets the GIMP handle the image format.