I think it has to be pretty exact dimensions..
It's supposed to resize them if they are too big.. Also I'd suggest that you look in to the security of the function, and figures out, if it's safe to have it enabled. It's often features like that, that opens up forums, or even entire servers, to atackers..
I've enabled safe mode in PHP for the board, now, just to be on the safe side.. If things act up, drop me a mail..