我正在使用以下方法从现有图像创建 BitmapImage:
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new Uri(jpegPath, UriKind.Relative);
bmp.EndInit();
完成此操作后,我想从硬盘驱动器中删除图像,但它已被锁定。有没有办法可以解锁它以便将其删除?
我正在使用以下方法从现有图像创建 BitmapImage:
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new Uri(jpegPath, UriKind.Relative);
bmp.EndInit();
完成此操作后,我想从硬盘驱动器中删除图像,但它已被锁定。有没有办法可以解锁它以便将其删除?