开发者

Difference between bitmap object and bitmap file?

I'm creating an avi file out of bit开发者_如何学Cmaps using C#.

I'm able to create the avi file if I use the stored .bmp files captured using a webcamera:

Bitmap bitmap = (Bitmap)Image.FromFile("abc.bmp");

But if I try to store the captured bitmaps in an array or arraylist, then the avi does not create correctly - says corrupted:

Bitmap bitmap = (Bitmap)BitMapList[0];

Note: BitMapList is a Bitmap array.

Can someone pls let me know what's the conflict out there?


Although the Bitmap class and the bitmap file format have similar names, they are not directly related.

The bitmap file format is one of the file formats for storing an image as a file. The Bitmap class is used to hold an image in memory. When you load any image format from a file it's decoded and you get a Bitmap object containing the image data, regardless of the file format. It's not specific to the bitmap file format.

There is nothing special in putting Bitmap objects in an array. If you see any difference, there has to be something wrong with how you put the objects in the array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜