This project is read-only.


Jan 24, 2009 at 10:20 AM
This project look very interesting, but i could not find any documentation. Is there any ?
Also, i was unable to compile the source code with visual studio 2005 (no AssemblyInfo.cs), am i doing something wrong ?
Aug 26, 2009 at 2:16 PM

I have not found any documentation so I have a code snippet for resizing an animated GIF.

/// Add a reference to the Jillzhang.GifUtility.dll

/// Insert the following using statment.
using Jillzhang.GifUtility;

/// Using the orignal image path select a percentage to be
/// resized with a double and a temporary file location
/// to store the newly resize GIF.
GifHelper _helper = new GifHelper();
_helper.GetThumbnail( [Original File Path], [Ratio to be Resized], [Path to be Saved]);

In my case I am using the above code inside a resize.aspx page.

  1. resize.aspx?imageUrl=~/images/banners/test.gif&maxWidth=223&maxHeight=55
  2. load the original file.
  3. calculate the width and height scale ratio and using the smallest ratio as my scaling value.
  4. resize .gif and save it in a temp directory using session id as new file name.
  5. create a FileStream with the newly created temp image.
  6. reading FileStream into a byte[].
  7. adjusting and/or adding Response header information:
    • ContentType = "image/gif".
    • Content-Length = FileStream.Length.
  8. using the Response.BinaryWriter to write the byte[].
  9. cleanup temp directory of all temp images.
  10. end response.

This allows me to manipulate any animated image within my website by calling the resize.aspx with a modifiable query string.


<img id="Image1" 
     src="resize.aspx?imageUrl=sample.gif&maxWidth=223&maxHeight=55" />

Apr 28, 2014 at 8:28 AM
Yeah it would be so great for somebody who have done this to provide a simple guide for gif processing.

Thank you so much for the gif resizing demo here, rfidler! :D

Kind regards,