以下は、境界線オブジェクトの背景として画像を描画する私のコードです。
void DrawImage()
{
MemoryStream ms = new MemoryStream();
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
System.Windows.Media.Imaging.BitmapImage chartBitmapImage = new System.Windows.Media.Imaging.BitmapImage();
chartBitmapImage.BeginInit();
chartBitmapImage.StreamSource = new MemoryStream(ms.ToArray());
chartBitmapImage.EndInit();
imageBrush.ImageSource = chartBitmapImage;
aBorder.Background = imageBrush;
...
}
上記の DrawImage() メソッドは毎秒呼び出されます。すべての操作はうまく機能しますが、遅すぎます。
性能を上げたい。これを改善するポイントはありますか?たぶん、bmp 画像処理方法は、私が使用したよりも優れたソリューションだと思います。助けて...