Text this: How to Optimally Sample and Resample Images.