C# Developers' Journal (original) (raw)

4:16p

Image Resizing. I just thought I would say hi since this is my first post in this community. My background consists of Visual Basic and ASP for about 5 years then I started reading into C++, then low and behold they came out with C# a language that could be used in ASP.NET. So as of right now I am coding in C# for windows applications and web applications.

The question I pose to this forum. I am glad that they gave us access on the web to System.Drawing namespaces, but why is it soo clunky?
Explaination; when I have a aspx file that creates a thumbnail of an image, the best method at this current moment is to create a Bitmap object of the size you are looking for and basically throw the image into that newly created Bitmap object. To me it seems a bit slow in running. Now there is also the Image.GetThumbNailImage method that you get from the System.Drawing.Image namespace. Problem with that one is that the thumbnails look horrible if you make it any larger than 100x100 pixels. The reason that I have found for that is because the GetThumbNailImage uses the thumbnail image that is embedded in the jpeg format. Now here is the thing, on a digital camera that thumbnail image is uber small (25x25) I think, so that is why it looks horrible. So is there any better way to create thumbnails of jpegs that are 1600 x 1200 with out using a component? Is there any web references out there to the jpg file format and how to convert the image manually?

Well anyways my code is below, any questions or comments are welcome.
( Code hereCollapse )

Current Mood: contemplative