Make it work with Raspberry Pi, either with Pi Camera or gphoto.
Haven't tested webcam.
Guard against using output file of - if use_tmp_file
is True, since that won't work as expected with gphoto2.