Home > Uncategorized > GIF Proxy – Convert GIF to JPG (for Silverlight)

GIF Proxy – Convert GIF to JPG (for Silverlight)

One of the most irritating features of Silverlight, is that it can’t handle GIF images. There is the Imagetools library from CodePlex, but it’s complex to implement.

Here’s a simple way of doing it, via a GIF proxy. This is a simple web page that takes a url of a GIF image in the querystring and outputs a JPEG:

Example: Here’s a GIF:  http://www-wales.ch.cam.ac.uk/~wales/CCD/Thomson2/gif/560.gif

And Here’s it as a Jpeg: http://{removed}/GifProxy.aspx?url=http://www-wales.ch.cam.ac.uk/~wales/CCD/Thomson2/gif/560.gif

Great for Silverlight, WP7 (Windows Phone 7)  etc.

Advertisements
Categories: Uncategorized
  1. January 29, 2013 at 10:06 am

    Hello,
    I’m a wp7 dev, and your solution meet my needs. Your proxy is up and running, for 2 years, but is it possible to have the aspx page to set it on my own server?

    Have a nice day

  2. January 29, 2013 at 12:51 pm

    Here’s a PHP version:

    isset($_GET[‘url’]) ? $url = trim($_GET[‘url’]) : $url = ”;
    if ($url != ”){
    $image = imagecreatefromgif($url);
    imagejpeg($image);
    imagedestroy($image);
    }

    Thanks Fabrice!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: