Update image.class.js

error in final commit.
Merge pull request #1866 from asturur/fix-in-image-resize

fix image resize method