c# - How to get ratio of width x height of an image on disk / file? -


i have userpictures saved file on hdd. (not in database).

i height , width of *.jpg-files, how that?

(background: must calculate ratio between hight , width bring specified height , width without stretching it).

many formats support header info others don't so...

 image img = system.drawing.image.fromfile(path);  int height = img.height;  int width = img.width; 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -