avrdude: invalid output file format: -1
-U memtype:op:filename[:format]


Writing the flash memory does not require specifying the last field, because avrdude can detect it from the input file. However, for reading, there is not input file, so the format must be specified. For example, my command above becomes

sudo avrdude -p atmega8 -c usbasp -U flash:r:flash-image:r


for a raw binary. Silly question indeed, but as the error was un-ggolable, this answer could save someone 1 minute of their lives.