Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:06:07+00:00 2026-05-29T21:06:07+00:00

i am trying to load images from facebook. if a user has set a

  • 0

i am trying to load images from facebook. if a user has set a profile picture, then the picture is a jpg, however, if a user has not set one, then the picture is a stub image in gif format. i know that wp7 does not support displaying gif images (out of the box). is there any way to detect if the final picture is a gif or not?

for example, i make a BitmapImage like this:

BitmapImage img = new BitmapImage(new Uri("https://graph.facebook.com/userid1/picture"))

for this uri, the user does not have a profile picture. so i get taken to a stub gif image at https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v1/yo/r/UlIqmHJn-SK.gif.

if a user does have an image, then i request it as follows.

BitmapImage img = new BitmapImage(new Uri("https://graph.facebook.com/userid2/picture"))

for the above url i get taken to a url like this: https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/000000_1621037713_00000000_q.jpg

my question is then, once i get the BitmapImage object, img, can i determine if this is a JPG or GIF? can i convert it to a JPG if it is a gif?

i looked at some related questions, but the API discussed loaded the image asynchronously, which is not what i wanted at the moment. furthermore, there was poor documentation.

any help is appreciated.

nevermind, i followed the instructions here: Display GIF in a WP7 application with Silverlight. the user gave an excellent walk through.

  1. what you need to do before you do what this user suggested is to download the source code from codeplex.

  2. then you need to download BitMiracle’s JPEG library from http://bitmiracle.com/libjpeg/.

  3. go ahead and go into the /src/ImageTools directory and open up ImageTools.Phone.sln. add the ImageTools.IO.Jpeg.Phone project to the solution.

  4. when you build the solution it will complain about not finding BitMiracle’s JPEG dll, go ahead and reference that DLL for the Jpeg project. build again, and it should work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:06:09+00:00Added an answer on May 29, 2026 at 9:06 pm

    First download the image(any) using Httprequest or Webclient and then convert to jpg or png from gif(if it is gif) in the following way.

     GifDecoder gd = new GifDecoder();
     ImageTools.ExtendedImage img = new ImageTools.ExtendedImage();
     gd.Decode(img, stream);              //stream means image stream
     PngEncoder png = new PngEncoder();
     png.Encode(img, isoFileStreamdownload);  //isoFileStreamdownload means stream, which is used to save image in image file like(image.png))
    

    using ImageTools.dll, ImageTools.IO.Gif.dll,ImageTools.IO.Png.dll (Images Tools)

    I think it helps to you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to load profile images (friend images) from Facebook with AS3 but I
I'm trying to load images from a relative folder /media/one.jpg but it never loads,
I am trying to load images from the Facebook graph api into a div
Using javascript I'm trying to load images not on the current page (from an
Im loading an image from a SQL CE db and then trying to load
I'm trying to load images from the specific folder in sd card.i saved images
i am trying to load images from the northwind database (categories table, images that
hello i am trying to load images from files in the start of my
I am trying to load three different images from an array into corresponding cells
I am trying to load a list of images from an array. I got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.