Geeks With Blogs

Lance's TextBox

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?

Posted on Friday, September 19, 2008 4:29 PM Programming | Back to top

Comments on this post: 93x faster .NET Image Loading

# re: 93x faster .NET Image Loading
Requesting 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.
Left by Omar Shahine on Sep 19, 2008 6:25 PM

Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: