Minimize size of GIFs

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Posts: 1
Joined: 2017-04-19T10:57:07-07:00
Authentication code: 1151

Minimize size of GIFs

Post by PhilR » 2017-04-19T11:47:03-07:00

I'm trying to create reasonably sized GIFs in C# using Magick.NET and succeeding in all but the "reasonably sized" area. My target gif size is 300x250. My design requirements are
1) A static background,
2) One (A) set of three images, ( 150x250) where the images, in sequence, move about the background, and
3) A second set (B) of three images (150x100) which move about the background independently of 2), but on the same time scale.
So, images A1 & B1 move about the background for 20 frames, images A2 & B2 move about for 20 frames, ...

My approach has been to create the sequence of 3*20 frames as bitmaps, where I place, e.g., A1 & B1 where they are supposed to be, then adding those (300x250) bitmaps to a MagickImageCollection. I finally Quantize(256), and OptimizePlus() the collection, then write it out. This results in a gif of 800K which is too large for my requirements.

Is there a way to create GIFS without using the brute-strength approach I've taken?

Thanks, Phil

User avatar
Posts: 1304
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789

Re: Minimize size of GIFs

Post by dlemstra » 2017-04-22T06:37:40-07:00

Would it be possible to create a small project on something like github that demonstrates what you are doing? Will be easier to understand for me.
.NET + ImageMagick = Magick.NET, @MagickNET, Donate

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests