Jump to content

Animated gif Developping


Recommended Posts

How to manage frame and save animated gif.

I found a sample code which read some static gif and create a new gif with these image as frame.

here the link http://www.codeproject.com/dotnet/NGif.asp

I hope could help someone in developping a plugin [o something else]

I was able to create something, but i don't know how to integrate it in paint.net [during save or better using something like image ready animation toolbox]

If someone have an idea.....

deviantart.jpg mp.jpg

Link to comment
Share on other sites

I finally was able t do a vb.net projec which can load a gif, generating different frame [but i need to check the class that made this, is really slow], reorder them and resave them as a gif.

Also i made possible to use some image as frame and create a new gif.

I implement a new feature that i always need in photoshop, which give the possibility to extract all the frame in single file :D

I'm working on the class which read/save data from/into gif file .

Butthe only problem is to create a plugin for paint.net, i don't know how to do this... anyone can help me?

deviantart.jpg mp.jpg

Link to comment
Share on other sites

I used the core of NGif [see first post] and with vb.net [really sorry but I don't know c#, I'm going to install it in a few days] I create a simple application which read data from gif and set data into a datatable [to mantain order, source and duration of every frame - this may be helpfull for add text info at text layer i think... I hope someone read this] and create simple image as "layer" .

It's still in developing with some bug and I may implement some function than I could share it [but it's in vb.net , not c#]

deviantart.jpg mp.jpg

Link to comment
Share on other sites

  • 2 weeks later...

I'm going to create a new class that open animated gif and create frames but i have a problem with GDI

It work with the gif i try but not for this [see url below]

I try to search a solution into web but i didn't find nothing.

Anyone have an idea?

File for reference - go to :

http://nextage.altervista.org/PaintNetForum/

Here the error:

System.Runtime.InteropServices.ExternalException was unhandled
 ErrorCode=-2147467259
 Message="A generic error occurred in GDI+."
 Source="System.Drawing"
 StackTrace:
      at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
      at System.Drawing.Image.Save(Stream stream, ImageFormat format)
      at WindowsApplication1.gifTry.GoButton_Click(Object sender, EventArgs e) in gifTry.vb:line 37
      at System.Windows.Forms.Control.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
      at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.ButtonBase.WndProc(Message& m)
      at System.Windows.Forms.Button.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.Run(ApplicationContext context)
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
      at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
      at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
      at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()

deviantart.jpg mp.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...