How to force to upload a image with exact sizes?
This is mostly based on memory, so some details might be off.

The image field widget assumes that downsizing an image is a valid action in all cases, so you'll need to override it.

Implementing your own field widget requires a little bit of fiddling with the field api, but since your change is fairly small, you should be able to just wrap a number of image field function and add a single validation step.

Since image field already is mostly a wrapper around a file field, looking at the image field itself for how to implement the above is probably a good start.