开发者

Will .Net's Bitmap.Save method always produce same BMP file with the proper PixelFormat setting

I need to load some image files and convert it to certain format of BMP files. The system is made up of a C# PC application and a embedded application.

After conversion, the PC application downloads the converted image to flash and the embedded application will dynamically load and display it.

The image format used by the embedded system is basically 16bpp BMP with slight differences in its header part.

Because lack of memory, I hope the Bitmap object in the embedded applic开发者_StackOverflowation can point to the pixel array of the BMP in flash directly without any conversion on its side. So I need to do some work on PC side.

Here my question is there are lots of different varieties of BMP file formats, mainly the header part. Can I guarantee the Bitmap.Save will give me the same result no matter what kind input image it was given?

What I have done now is I create a Bitmap class and set the pixel format as 16bpp565 and save it as BMP files. Is this way safe?

For example a 16bpp BMP file can have an optional color table. How can I gurantee the BMP file I create without one.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜