New image resize code patched in


@speedster1 pointed out how larger images were not properly resizing. I looked into it and there were some bugs in the code as well as improvements, and I just patched in the new code. I expect there will still be a few glitches, please follow up here with any resize glitches. One issue is it seems to mess up the rotation sometimes for example. It should resize any image less than 10MB in size down to 2MB.