How to read the firsts bytes of png,jpg and jpeg and get the height/width
View Single Post
07-12-2010, 07:59 PM
To confirm santa's suggestion,
does exactly what you're looking for and will likely be as fast as you can get for doing this task.
The underlying C code for the function (for the common image types) literally reads the first few bytes of the file for the required width/height information; you can't get much more streamlined than that.
View Public Profile
Visit Salathe's homepage!
Find More Posts by Salathe