original file from mdsumner/ffraster

moved from forked ffraster repo