CodePudding user response:
//traverse files get wide highImage Image=Image. FromFile (path);//get photo, path for path
Int width=image. The width;//get wide
Int height=image. The height;//to get high
CodePudding user response:
Directory. GetFiles (@ "D: ", "*.jpg"), Where (p=& gt;{
//to see how do you want to, don't tangled in the upstairs to read in the image, to tangle of 32 bytes read only the head, according to the JPG format to parse the wide high
}). ToList ();
CodePudding user response:
https://stackoverflow.com/questions/111345/getting-image-dimensions-without-reading-the-entire-fileIf you want to tangle, is this way, the post don't know the format of the will, of course, throw exceptions, their processing
CodePudding user response:
I learn first, thanked first two upstairsCodePudding user response:
'd better write a GetImg method, call after release resources