As you may know, in Drupal 7 you can set max and min dimensions for an image field, when you upload a small image, Drupal returns an error, but when you upload a bigger file it resize the image automatically instead of return the error "Your image is too big...".
I was looking for the reason of that autoscale configuration but looks like it will never be fixed. I need to override it because some of my users still uploading pictures with other dimentions, even with a different aspect ratio.
I found the condition in includes/file.inc line 1809 ... it tries to scale the image if it's bigger. I know that i can comment that condition and it will work, but is not a good idea, so: Does anyone know how to override that condition using a custom module, hooks or something?