Solved

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

Posted on 2004-10-04
6
847 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

16 Experts available now in Live!

Get 1:1 Help Now