img2dec: Add ts_from_file option