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
Post a Comment