我想删除下面的POSTROUTING规则,
[root@hostname ~]# service iptables status
Table: nat
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination
1 MASQUERADE all -- 192.168.1.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
然后我输入下面,
[root@hostname ~]# iptables -D POSTROUTING 1
iptables: No chain/target/match by that name
Run Code Online (Sandbox Code Playgroud)
有什么不对的吗?
我可以从Assets中的图片创建WriteableBitmap.
Uri imageUri1 = new Uri("ms-appx:///Assets/sample1.jpg");
WriteableBitmap writeableBmp = await new WriteableBitmap(1, 1).FromContent(imageUri1);
Run Code Online (Sandbox Code Playgroud)
但是,我无法从图片目录创建WriteableBitmap,(我正在使用 WinRT XAML工具包)
//open image
StorageFolder picturesFolder = KnownFolders.PicturesLibrary;
StorageFile file = await picturesFolder.GetFileAsync("sample2.jpg");
var stream = await file.OpenReadAsync();
//create bitmap
BitmapImage bitmap2 = new BitmapImage();
bitmap2.SetSource();
bitmap2.SetSource(stream);
//create WriteableBitmap, but cannot
WriteableBitmap writeableBmp3 =
await WriteableBitmapFromBitmapImageExtension.FromBitmapImage(bitmap2);
Run Code Online (Sandbox Code Playgroud)
它是否正确 ?