added option to resize or not, depending
error message when not PIL