private BitmapSource TransferArgToBitmap(byte[] byteArray)
{
List<System.Windows.Media.Color> colors = new List<System.Windows.Media.Color>();
colors.Add(System.Windows.Media.Colors.Red);
colors.Add(System.Windows.Media.Colors.Blue);
colors.Add(System.Windows.Media.Colors.Green);
BitmapPalette bitmapPalette = new BitmapPalette(colors);
BitmapSource bitmapSource = BitmapImage.Create(704, 576, 96, 96, PixelFormats.Rgb24, bitmapPalette, byteArray, 704 * PixelFormats.Rgb24.BitsPerPixel / 8);
return bitmapSource;
}