Subsampling and ThumbnailOptions abstraction

Fixes #270