TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jaypee bacol
NA
67
0
How to convert multiple .png files to gif to creat gif animation in c#?
Dec 13 2009 9:46 PM
I tried this code below and it worked. But the problem is that, the quality is not good, I can see some colors are not good. I want to create gif that has good quality of resolution.
* create Gif */
//you should replace filepath
String[] imageFilePaths = new String[] { @"c:\gif\1\1.png", @"c:\gif\2\2.png", @"c:\gif\3\3.png", @"c:\gif\4\4.png", @"c:\gif\5\5.png", @"c:\gif\6\6.png"};
String outputFilePath = "c:\\test.gif";
AnimatedGifEncoder e = new AnimatedGifEncoder();
e.Start( outputFilePath );
e.SetDelay(500);
//-1:no repeat,0:always repeat
e.SetRepeat(0);
for (int i = 0, count = imageFilePaths.Length; i < count; i++ )
{
e.AddFrame( Image.FromFile( imageFilePaths[i] ) );
}
e.Finish();
Please help me this is urgent
Reply
Answers (
2
)
Inheritance
Combobox and Database