93x faster .NET Image Loading

I was looking around for how to load images faster than the .NET System.Drawing.Image class and found this awesome finding from Omar Shahine.  The .NET 1.1 SP1 update included a new signature for System.Drawing.Image.FromStream that takes a boolean “validateImageData”.  If you set this to true, the loading time is *much* faster.  Does anybody know what validation is actually performed when this parameter is true?

Print | posted on Friday, September 19, 2008 4:29 PM

Feedback

# re: 93x faster .NET Image Loading

Left by Omar Shahine at 9/19/2008 6:25 PM
Gravatar I believe it validates if the image is in fact a jpg so that you don't hurt yourself by accidentally load a txt file.

Your comment:





 
 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski