Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Play .Gif File in silverlight
11 replies. Latest Post by rontch on November 12, 2009.
(0)
NavinKum...
Member
295 points
227 Posts
10-28-2009 2:18 AM |
Hello community,
i need to play a gif file in silverlight. can it be possible to play a .gif animation if yes how to do it please explain me i got a link
please refer this link that i got and please send me your's taughts how can i implement .Gif images in silverlight 3
and also i got this link where we can get some customized loading gif images
watabou
418 points
75 Posts
10-28-2009 2:35 AM |
I think this is what you're looking for :
http://imagetools.codeplex.com/
brauliod
Participant
1169 points
472 Posts
10-28-2009 3:39 AM |
Wow !!
I was not aware that Image Tools was able to load animated gifs, ... about this open source project, is quite active, you can easily contact with the person that developed it and probably will get a quick response.
Cheers
Braulio
rontch
12 points
6 Posts
11-08-2009 8:19 AM |
Hi Brauliod,
Were you able to use the ImageTools.dll in Silverlight application?
Can you be kind and share a few lines on how to set the animated-gif to work.
I've tried (with no success):
xmlns
what am i missing here? the above code fail when i start the application
Thanks in advance, Ron
malignate
16 points
17 Posts
11-08-2009 2:27 PM |
Hi,
I have created this project.
First two questions: (1) Which version do you use? Please download the latest source and compile it. There are a lot of bugs in version 0.1.(2) Where is the image located?
11-08-2009 5:31 PM |
1) I'm using the 'Download' link - which only gives me the DLL (version 1.1) - but i couldn't see any demo-project that i caould compile in this link.
2)The image - which is an animated gif - is located under ClientBin\Images\progressbar.gif
* in order to make sure that the path is correct in Source="Images/progressbar.gif" I've set the path to another image - under "Images" as well, and it does show the image (normal gif, not animated).
11-10-2009 3:27 AM |
Please download the latest source and compile it. You will also find some demo projects there.
As far as I have time to complete the gif encoder, a new version will be released.
If this also does not work (but I have tested it again yesterday), please send me your image for testing.
11-11-2009 9:26 AM |
Hi, I have tried working with your sample code on ImageTools.Demo.Animation(under your link: http://imagetools.codeplex.com/SourceControl/changeset/view/33161#518787)
but with no luck.. The WrapPanel does not display my Animated-GIF.
I have attached the file i'm using (not sure if it was upload correctly) - if you can please check if it works for you.
The code I'm using is below - appreciate if you can let me know what am i doing wrong here:
System.Windows.Media.Imaging.
smiley.Source = imgSource1;
smiley.Margin =
11-11-2009 1:02 PM |
Aah, I think I see the problem. Whenever you pass an relative address like yours the image looks in the assembly for an image.
When you specify an absolute address like http://domain/images/mygif.gif it uses a WebClient to get the stream to the image. I will have a look with reflector how Image handles this. Didnt know that it also works when placing the image under ClientBin.
11-11-2009 8:46 PM |
hope i helped you think of how to improve the code. I realy think it's a good project and a great innovation of yours, thanks.
I managed to download the project and noticed you placed your "Images" folder in each of your demo projects.
fyi, Images Uri in silverlight works RELATIVE TO THE .xap FILE LOCATION.
>> the .xap file is always under ClientBin
>> if you've got a folder "ClientBin/Images" then your xaml code should refer the Uri as: Source="Images/myImg.png"
waiting to see your new version,
11-12-2009 1:17 AM |
you can retry it if you want :)
11-12-2009 8:13 AM |
hi again,
thanks for your efforts, just 1 thing is still a mistory..
I've started a new VS2008 "Silverlight application" , with .Web project and duplicate the structure you've demo in ImageTools.Demo.Sources. (meaning I've ended up with 2 project: Sources and Sources.Web)
My goal here is to use the references only - from the Bin folder.
The thing is that I'm getting a Javascript error when running the sample solution...
Can you please confirm it's an issue? I've cheked the silvelight versions and project properties and it's all the same, just your project rs but mine doesn't :)
(I can run the demo project fine - when running from your solution. Weird isn't it..)