Server-side Image Resizing Module for ASP.NET, ASP, & PHP/IIS
Open-source image resizing module for ASP.NET. Great for thumbnails and slideshows. Features managed disk caching, jpeg/png/gif support, and bicubic resizing.Server-side image resizing is one of those tiny features that can have incredible ROI. It can save webmasters several hours each day, and gives you the ability to change the resolution of an image without having to hunt up the original. However, many of the approaches currently on the web don't take security or performance into account.
v1.0 - August 6, 2008
v1.2 - Nov 23, 2008
v2.0 alpha -Mar 1, 2009 (by request)View License Documentation If you have any questions after reading the documentation, leave a comment or e-mail [email protected].
- Querystring-based resizing: image.jpg?width=100
- ?format=jpg|png|gif — Changes the output format. (This was 'thumbnail' in v1.0).
- &maxwidth=value&maxheight=value — Specify the maximum size for the resized image. Aspect ratio is maintained. You don't have to use both maxwidth and maxheight - you can use just one.
- &height=value&width=value — If used together, these will force the image to be stretched to the new dimensions. If height or width is used by itself, aspect ratio is maintained.
- &quality=0-100 — Changes the jpeg compression setting. 90 is the default value, and you really don't need to touch it. 90 produces fantastic quality and tiny files. New in v1.2
- Secure - images still have to pass through ASP.NET's URL authorization system.
- Can be used from ASP, PHP, HTML files, or any language that runs alongside ASP.NET. Images are separate requests, so you don't need to be using ASP.NET to make this work for you.
- Not just for thumbnails - can resize images to any resolution. You can set the size limitations in web.config.
- Great for slideshows - you can change the resolution of the images dynamically as the user resizes.
- Supported input formats: BMP, GIF, JPG, PNG and TIFF
- Supported output formats: JPG, PNG, GIF
- Photoshop-quality bicubic resizing and jpeg compression.
- Works with IIS5, IIS5.1, IIS6, IIS7, and ASP.NET 2.0+. v1.2 is optimized for IIS7 Integrated mode
- Well documented, well organized code.
- Great platform to build your own image processing systems on. You can use the disk caching system or image processing code separately.
- You can set entire folders of images to resize using CustomFolders.cs. (v1.2) You can do "URL rewriting" on your images there also.
- Example watermarking code. You can enable this feature by uncommenting the code.
- yrl class for dealing with virtual paths.
- Disk-based caching. Subsequent identical resizes are instantaneous.
- Caching doesn't get in your way - if you modify the source file, the resized versions are also updated.
- You can resize the same image to several different sizes, and the different versions are cached separately.
- Managed disk cache. If the number of cached files exceeds the configured threshold, a cleanup pass is made on the directory, and a block of the least recently used files are removed.
- Client-side caching directives are sent, minimizing repetitive requests from the same client.
- Thumbnail generation in under 20 milliseconds for most images.
- Suitable for slideshows and lists of images. Even the initial resizing of 50 images concurrently isn't noticeably slow.
- Good with large source files (1-5MB)