Dynamic Images

Easily resize images on-the-fly without expensive hardware/software or tricky configurations. Through the use of URL paramters an image can be resized, cropped, and/or converted to web formats on the fly. This means that as a web developer or content poster you no longer have to mess around with Photoshop or other image editing software to get the right size then save multiple copies of the same image to your site.

The following examples show how an image can be resized and adjusted to meet your sites needs. All of these examples are being generated on-the-fly from the same source image.

Sizing

The Spry Image Server provides 3 sizing paramters which can be used to adjust the output size of the image. These paramters are "wid", "hei", and "cell". The "wid" paramter allows you to specify the width of the output image. The "hei" paramter allows you to speicify the height of the output image. The "cell" parameter requires a minimum of one value passed but can take up to three, if only two values are passed the output image will be sized such that the width is no larger than the first paramter and the height is no larger than the second paramter. The optional third paramter of the cell command is a colour paramter, if it is passed the output image will be the exact size of the first two cell paramters and the image will be padded with the colour specified in the third paramter.

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&wid=100&cvt=jpeg

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&cell=200&cvt=jpeg

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&hei=250&cvt=jpeg

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&cell=200,200,0xFFFF0000&cvt=jpeg

Quality

Quality adjustment of the images can be performed by adding the "qlt" paramter. The paramter can have values between 1 and 100 and represents the amount of jpeg compression which will be applied to the output image.

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&wid=200&qlt=30&cvt=jpeg

Cropping

The source image can be cropped using one of two paramters "rgn" or "rgnn" both provide the same basic feature but calculate their crop area using different methods. Both commands are passed four values which are percentage values (between 0 and 1) representing the area for the crop. The "rgn" command takes values x,y,w,(h/aspect), while the "rgnn" command takes values x,y,w,h.

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&wid=200&rgnn=0.2,0.2,.5,.5&cvt=jpeg

Conversion

Your source image can be dynamically converted to JPEG, GIF, PNG or BMP through the use of the "cvt" paramter. This paramter takes only value which is the output type you wish to convert too.

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&wid=200&cvt=gif

Text Overlay

Overlay text on your images to create dynamic buttons or as an image watermark through the use of the "text" paramter. This paramter takes 5 values: text to overlay, x-position, y-position, font size, font colour, font family, and font style. All paramters are optional except for the text to overlay. The x-position and y-position can either be an integer for exact pixel positioning or between 0 and 1 for positing based on percentages of the output image.

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&text=my+text,10,10,30,0xFFFFFFFF,Arial,Bold&wid=200&cvt=jpeg

http://www.spryphoto.com/spryIS.aspx?img=/images/rainboots.jpg&text=my+text,5,.3,70,0x4FFFFFFF,Arial,Bold&wid=200&cvt=jpeg