It depends on your server. For example, if you need to upload an image with 4200x3200 resolution, your server will require the following memory capacity:
4200 x 3200 x 3 = 40320000 bytes ~ 38.4Mb just for processing this image. So, in this case you need to set a "Memory limit" of minimum 40Mb in php.ini. The larger "Memory limit" you will set, the higher will be the resolution of the images you'll be allowed to upload.