English 中文(简体)
Con file file
原标题:Converting animated .gif file into a .bmp strip

我很想知道,有人是否能够引导我或引导我,以便使用一种形象,将其转化为一种刺.光图像。

问题回答

首先,你们需要获得天花。 然后,你需要找到多少框架。

之后,你需要以Height = 原始高度和Width = Frames * Gif Width为新形象。

然后,你必须把原来的Gif的 frames子 past到像样的地带:Filme N开始在Pixel N*Width。

也就是说,如果你重新开平线。


And here is the complete code for a console application:

using System.Drawing;
using System.Drawing.Imaging;

foreach (var arg in args)
    {
        Image gif = Image.FromFile(arg);
        FrameDimension dim = new FrameDimension(gif.FrameDimensionsList[0]);
        int frames = gif.GetFrameCount(dim);

        Bitmap resultingImage = new Bitmap(gif.Width * frames, gif.Height);

        for (int i = 0; i < frames; i++)
        {
            gif.SelectActiveFrame(dim, i);

            Rectangle destRegion = new Rectangle(gif.Width * i, 0, gif.Width, gif.Height);
            Rectangle srcRegion = new Rectangle(0, 0, gif.Width, gif.Height);

            using (Graphics grD = Graphics.FromImage(resultingImage))
            {
                grD.DrawImage(gif, destRegion, srcRegion, GraphicsUnit.Pixel);
            }
        }

        resultingImage.Save("res.png", ImageFormat.Png);
    }

The resulting image is saved in the compiled console app binary file directory under the name res.png. You can make the app save the resulting image right where the source file is, ask whether to make a horizontal or vertical strip, etc.

能够很容易地与照片店做一幅形象图象(青年可以获得免费的试版或部件)。

  1. Open .gif - Photoshop will open each frame as a layer
  2. Resize canvas to (height of the gif * layers) pixels
  3. Remove all frame information, keep layers
  4. Select last layer, and move it to very bottom
  5. Select all layers and click Distribute vertical centers . Now you have a perfectly arranged strip.

如果你使用照片店,你就只能出口BMP。 这就是说。

可靠方法是:

  1. Download an install Easy GIF Animator
  2. Open tour gif with it and export the frames to separate files
  3. Download and install any program which can create the layers (eg. Photoshop CS3 Little)
  4. Create a new file width as your picture; Height = Height of Your pic. X number of pictures
  5. Copy each pic. as a layers in to Your new file and move them one after the other.
  6. Save it as a .png file
  7. Download an install iPAQ 31x Image Explorer
  8. Open Your .png in it
  9. Save it as aRGB file (normal BMP may don t work)
  10. DONE!!

也许这并非最容易的方法,但可以进行精确的编辑,并允许你在透明的背景下(但不限于信标) strip。

Just load .gif in Bitmap and save it in .bmp. If you want to export the frames of .gif I have no idea how to do this. You can have look at this www.eggheadcafe.com/articles/stripimagefromanimatedgif.asp, it seems to be what what you re looking for.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签