Created
February 18, 2015 15:06
-
-
Save dejanstojanovic/c5df7310174b570c16bc to your computer and use it in GitHub Desktop.
Fast and short way to get image size in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using(var img = Image.FromFile(file.Name)) | |
{ | |
var height = img.Height; | |
var width = img.Width; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Huge performance improvement over the first option - thank you!