I am having a problem converting the following code snippet for an existing component into Silverlight.
Bitmap bmp = new Bitmap(width, height);
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format24bppRgb);
Marshal.Copy(data, 0, bmpData.Scan0, data.Length);
bmp.UnlockBits(bmpData);
data is byte[]
and width
and height
are the required image width and height.
Can anyone share some ideas on this?