Is there a quick method to determine if an image is a square or not in C#?
Question has been phrased incorrectly, my apologies.
Is there a way to determine if an image can be scaled "down" to fit into a square block, without cropping either height or width, for example, if I have 960x640, we have a square, on it's width, but if we have 640x960, we don't.
I need to be able to determine if an image can be scaled down 100% into a square block, for example, 150x150, without losing portions of the image.
Update
Let me try again.
I have to iterate a collection of images:
960x658 960x566 960x381 960x378 714x960 658x960
I know, that the first two images will be square (150x150), I know the middle two will be rectangular (horizontal) (300x150) and I know the remaining two will be rectangular (vertical) (150x300). Is there an algorithm, 3rd party component or built in method to determine this for me?
I don't want to go and code nested spaghetti code using if statements to do this? I'm so lost :$