I was wondering if someone can direct me or guide me in order to use a .gif image and convert it into a .bmp strip image file.
-
What's a .bmp strip? Do you mean an animated .gif and you want to split the frames out into separate images? And then stitch them all together side-by-side? – Rup Apr 04 '12 at 15:00
-
Yes i to essentially want to stitch them together and i am clueless on how to do this. – SpaceApple Apr 05 '12 at 06:06
4 Answers
First, you need to get the gif's size. Then you need to find out how many frames there are.
After that you need to create a new image with Height = original height, and Width = Frames * Gif Width.
Then you must paste the original Gif's frames into the strip like so: Frame N starts at pixel N*Width.
That is if you're making a horizontal strip.
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.

- 8,561
- 18
- 61
- 122
Making an image strip can be easily done with Photoshop (you can get a free trial version, or Elements)
- Open .gif - Photoshop will open each frame as a layer
- Resize canvas to (height of the gif * layers) pixels
- Remove all frame information, keep layers
- Select last layer, and move it to very bottom
- Select all layers and click 'Distribute vertical centers'. Now you have a perfectly arranged strip.
If you are using Photoshop, you can just export as BMP. Thats it.

- 31
- 3
The method what works for sure is:
- Download an install Easy GIF Animator
- Open tour gif with it and export the frames to separate files
- Download and install any program which can create the layers (eg. Photoshop CS3 Little)
- Create a new file width as your picture; Height = Height of Your pic. X number of pictures
- Copy each pic. as a layers in to Your new file and move them one after the other.
- Save it as a .png file
- Download an install iPAQ 31x Image Explorer
- Open Your .png in it
- Save it as aRGB file (normal BMP may don't work)
- DONE!!
Maybe it's not the easiest method but it gives the possibility of precise editing and allows you to make strips of icons that are on a transparent background (but not limited to icons)

- 33,765
- 9
- 83
- 112

- 21
- 2
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.
-
I had a look at this example before and it did not do what i wanted, although this example does split each frame from the .gif into separated images but i want those images stitched together into a single image. – SpaceApple Apr 05 '12 at 06:08