Dynamic Image Resizing Module

By nathanael.jones@gmail.com

Download
Category Development
License Free to try
Downloads 271
Supported by Email, Forums
Works with IIS 5, IIS 5.1, IIS 6, IIS 7
Documentation Dynamic Image Resizing Module Documentation
Updated on 8/6/2009 12:50 PM

Overview

Let the server resize your images for you! Once installed, you can size, crop, and change the format of images from anywhere... HTML, ASP.NET, ASP, PHP, Flex, or Flash ... Just add the desired behavior to the URL with "?width=100" or "?format=jpg". It supports scaling, cropping, rotating, flipping, stretching, padding, borders, transparency, jpeg, png, and gif formats. Aspect ratio is always maintained unless &stretch=fill is specified.

Features

Command Reference

  • width, height - force the width and/or height to certain dimensions. Whitespace will be added if the aspect ratio is different.
  • maxwidth, maxheight - fit the image within the specified bounds. (Most often used)
  • crop=auto - Crop the image the the size specified by width and height. Centers and minimally crops to preserve aspect ratio.
  • crop=(x1,y1,x2,y2) - Crop the image to the specified rectangle on the source image. You can use negative coordinates to specifiy bottom-right relative locations.
  • rotate=degress - Rotate the image.
  • bgcolor=color name| hex code (6-char). Sets the background/whitespace color.
  • stretch=fill - Stretches the image to width and height if both are specified. This is the only way to lose aspect ratio.
  • scale=both|upscaleonly|downscaleonly - By default, images are never upscaled. Use &scale=both to grow an image.
  • flip=h|v|both - Flips the image after resizing.
  • sourceFlip=h|v|both - Flips the source image before resizing/rotation.
  • paddingWidth=px & paddingColor=color|hex. paddingColor defaults to bgcolor, which defaults to white.
  • borderWidth=px, borderColor=color|hex.
  • format=jpg|png|gif
  • colors=2-255 - Control the palette size of PNG and GIF images. If omitted, PNGs will be 24-bit.
  • frame=x - Choose which frame of an animated GIF to display.
  • page=x - Choose which page of a multi-page TIFF document to display.

Benefits

Server-side image resizing is one of those little 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.


Requirements

ASP.NET 2.0+, IIS5+
Download Web PI

Get official IIS Extensions and more with
the Microsoft Web Platform Installer

Microsoft Communities