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.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
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.
Making an image strip can be easily done with Photoshop (you can get a free trial version, or Elements)
If you are using Photoshop, you can just export as BMP. Thats it.
The method what works for sure is:
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)
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:
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.