I’m creating a regular gallery in ASP.NET but I have little experiences with creation of thumbnails. I know the algorithms and the GetThumbnailImage method, but my problem is somewhere else – I’m currently displaying the images (just resized) using the ImageButton control. And that’s the point – I have no idea how to hook up the ‘thumbnailed’ image to the ImageUrl property. Is it even possible and if yes, how? Or should I use some other control instead? Thanks for any suggestions!
I’m creating a regular gallery in ASP.NET but I have little experiences with creation
Share
You can create a HttpHandler which handles image requests and returns thumbnails (or does whatever you need on the images).
Whenever you do graphics stuff in ASP.NET, keep in mind that almost all of System.Drawing is a wrapper for GDI+ and thetrefore holds references to unmanaged memory which needs to be disposed properly (use the
usingstatement). This holds true even for simple classes like StringFormat etc.