Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3931540
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:21:41+00:00 2026-05-19T23:21:41+00:00

I am using imagemagick DLL (Refer: http://www.imagemagick.org ) for the resize image, But when

  • 0

I am using imagemagick DLL (Refer: http://www.imagemagick.org) for the resize image,
But when I re-sized animated GIF image then it going screw.

I using below code for re-size image ( image type are png, gif, jpg, bmp, tif …)

ImageMagickObject.MagickImage imgLarge = new ImageMagickObject.MagickImage();
 object[] o = new object[] { strOrig, "-resize", size, "-gravity", "center", "-colorspace", "RGB", "-extent", "1024x768", strDestNw };
imgLarge.Convert(ref o);

How can I fixed it.
see the result image enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:21:41+00:00Added an answer on May 19, 2026 at 11:21 pm

    I think you have to extract every single frame from the gif first, resize every single frame and then put it back together.

    Edit: like this? Not tested nor builded…

    int maxFrames=32;
    ImageMagickObject.MagickImage imgLarge = new ImageMagickObject.MagickImage();  
    
    // first extract all frames from gif to single png files
    for(int frame=0; frame<maxFrames;frame++)
    {
       object[] o = new object[] { String.Format(strOrig+"[{0}]", frame)
           ,  String.Format("tmp{0}.png", frame) };
       imgLarge.Convert(ref o);    
    }
    // resize every single png files
    // add resized filenames to stringbuilder
    StringBuilder filenames = new StringBuilder();
    for(int frame=0; frame<maxFrames;frame++)
    {
       object[] o = new object[] { String.Format("tmp{0}.png", frame)
                    , "-resize"
                    , size 
                    , "-gravity"
                    , "center"
                    , "-colorspace"
                    , "RGB"
                    , "-extent"
                    , "1024x768"
                    , String.Format("tmp-resized{0}.png", frame) };
       filenames.Append(String.Format("tmp-resized{0}.png", frame));
       filenames.Append(Environment.NewLine);
       imgLarge.Convert(ref o);    
    }
    // write resized filenames to file
    File.WriteAllText("tmp-resized-files.txt", filenames);
    // create resize animated gif based on filenames in the tmp-resized-files.txt
       object[] o = new object[] { "@tmp-resized-files.txt"
           ,  strDestNw };
       imgLarge.Convert(ref o);    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ImageMagick from the command line to resize images: convert -size 320x240 image.jpg
How should I convert pdf file into image (.jpg, .gif etc) using ImageMagick on
I am using ImageMagick with animated gifs but it is very slow. Taking twenty
I am working on a .NET application to reduce image file sizes using ImageMagick
I am using mini_magick as the interface of utilizing ImageMagick to manipulate some image.
I'm using ImageMagick's convert tool to generate image thumbnails for a web application. I'm
I've been using Imagemagick's mogrify on Cygwin, but at some point it stopped working.
I am working on a web script that handles image processing using ImageMagick. It
i am using Imagemagick for converting my .pdf file to .png images but when
I am using ImageMagick via Symfony to resize images in PHP. The sfThumbnailer class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.