Minimum width and length when uploading a picture

Hi, When the user is trying to upload an image, I want to control image's width, length. Ive read an old topic, was wondering whether someone has done similar? thnx
1 answers

If being strict, it won't help you to know who did the same. And also the word 'control' is not clear because you can read this as 'prevent to upload certain sizes' or 'automatically resize to default size ranges'.

For both you need some java to read the properties of the image. First use for example apache tika to detect the filetype (jpg, png etc). and look at stackoverflow to find some code to get image properties. The ImageIO (standard Java) seems to be fine for that.

Use to resize an image.

Use to crop images.