Imaging in .NET
I was playing around with an ASP project and used the ASPImage from serverobjects.com to do some stuff in ASP to resize and change DPI, etc.
But I wanted to do this in ASP.NET so that I could mass change the image sizes and create thumbnails (sort of). So I did a google search of [image resize .net] and I got some interesting links and some were good and others were not. I found this link on the second page to resize images and I tweaked it to make them the size I wanted to and to keep proportions correct. I was surprised how easy it was to get it to generate thumbnails for me.
I then went after changing the DPI of the image to 72. By default, I found that the Framework uses 96 dpi for it’s images and that if I used the System.Drawing.Image.SetResolution(int, int) that I could change it from 96 to 72. One thing I found that I could not change the original graphics DPI, I had to copy that image into the new graphic at that dpi. It worked and I was very happy to learn this. Not earth shattering, but a new one for me.
Happy Imaging…