Fixed a bug that was causing the image to get incorrectly rescaled.
removed power of 2 size restrictions.