changed usage of isResizeNecessary() with new method

that takes options for upscaling and cropping into account.

Thefore added code into ___resize() method and
put code from ___resize() into new method getCropDimensions()
and into new method prepareImageLayer()