Générér une image en c# (binary image data)
Bonjour a tous,
Dans le cadre du développement d'une application pour afficher l'ecran d'une SoundBridge, j'ai besoin de créer une image.
Je me connecte en telnet à la soundbridge, et elle me renvoie l'image sous forme d'une "binary image data".
Ça ressemble à cela :
Code:
0000380038003800fe007c00380010000000fefe02020202020202020000000000005e5e0000000000003e3e101020202020101000001c1c2a2a2a2a2a2a1a1a0000000000000000000000000000fefe909090989094806200000004002a5e2a002a001e00003e0c10122012201210fe00001c002a002a5e2a001a000000101c10227e229022501c000000008200fe00020000000000200012820cfe108220000000003e001000200020001e0000fe20402030fc4022fe2400001c1c2a2a2a2a2a2a1a1a00000c3e121012201220fe100000003e00105e200020001e0000041c2a2a2a2a2a2a1e1a00000020002000fc00220024000062009200920092008c0000001c002a002a002a001a0000003e00100020002000100000003800040002000400380000001c002a002a002a001a0000003e0010002000200010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc47fc6ffff7fc63fc4000000000000000000007fff7fff7fff60606060607070f83ffc3fde1f8f0f07000301f903fc07fe070e0e070e070e07070e07fe03fc01f8000007ff07ff07ff007000f801fc03de078f070706030401000007fc07fe07ff000f000700070007000e07fc07fe07ff00000000
Je voudrais à partir de la générer un fichier image, mais je ne trouve pas comment faire.
Existe il une fonction pour faire cela ?
La documentation de la soundbridge qui decrit le format explique cela :
Citation:
returns binary image data
Format of the Bitmap Display Data
The bitmap display data is returned as a stream of bytes. The format of the data
is unusual in that the bytes represent columns of pixels. (Most bitmaps store
data as bytes of pixel rows.) For example, when the display is a 280 x 16
bitmapped display, GetDisplayData will return 560 bytes of data, with every 2
bytes representing a single column of pixel data, starting at the left-most column.
Within each byte, the most-significant bit represents the pixel nearest the top of
the bitmap, and the least-significant bit represents the pixel nearest the bottom of
the bitmap.
Merci à vous.