Solved

saving a group of gif files into animated gif using c#

Posted on 2004-10-04
6
845 Views
Last Modified: 2012-05-05
im working on an animation wizard using c#. the idea is to save the group of gif files into one animated gif file. i read that this could be done using the image.saveadd function, the problem is that i couldnt use this function properly.i cant understand what im supposed to do with the encoderparameters parameter. can anybody give me a sample code explaining how to combine two gif files in one animated gif file for instance??
0
Comment
Question by:huda_qadura
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
Thogek earned 125 total points
ID: 12219840
Are we talking about this Image.SaveAdd method?
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdrawingimageclasssaveaddtopic1.asp

The encoderParams parameter is apparently an EncoderParameters object, which "encapsulates an array of EncoderParameter objects,", each of which contains "an array of values to an image encoder."  (A bit cryptic, eh?)

EncoderParameters: http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdrawingimagingencoderparametersclasstopic.asp
EncoderParameter Members: http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdrawingimagingencoderparametermemberstopic.asp

It looks like the EncoderParameter's Encoder property (containing an Encoder object) would be of most interest: http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdrawingimagingencoderparameterclassencodertopic.asp
0
 
LVL 15

Expert Comment

by:Thogek
ID: 12220005
There seem to be a few comments out there suggesting that the current .NET image encoders may not be capable of outputting animated GIFs.
http://www.dotnet247.com/247reference/msgs/28/140353.aspx
http://www.developersdex.com/vb/message.asp?p=2919&ID=%3CuoJvo4PjEHA.704%40TK2MSFTNGP09.phx.gbl%3E
0
 
LVL 9

Expert Comment

by:msdixon
ID: 12236998
another problem you'll run into is the color pallete. in order to get a custom pallete you'll have to run some unsafe code, and it's really quite a pain.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now