Solved

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

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 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