SilverLight中
1.添加图片并转换成byte[]数组
using System.IO;
using System.Linq;
using System.Windows.Media.Imaging;
public void Browse_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "图片|*.jpg;*.png;*.gif;*.bmp;*.jpeg";
Nullable<bool> result = dlg.ShowDialog();
if (result == true)
{
string filename = dlg.File.Name;
Img