BitmapMetadata.IsFixedSize 属性

定义

获取一个值,该值确定 BitmapMetadata 对象是否为固定大小。

public:
 property bool IsFixedSize { bool get(); };
public bool IsFixedSize { get; }
member this.IsFixedSize : bool
Public ReadOnly Property IsFixedSize As Boolean

属性值

如果 BitmapMetadata 为固定大小,则为 true;否则为 false。 默认值是 false

示例

下面的代码示例演示如何读取 对象的各种属性 BitmapMetadata 并将其值作为字符串发送到 MessageBox

FileStream stream4 = new FileStream("image3.tif", FileMode.Create);
BitmapMetadata myBitmapMetadata2 = new BitmapMetadata("tiff");
TiffBitmapEncoder encoder4 = new TiffBitmapEncoder();
MessageBox.Show(myBitmapMetadata2.IsFixedSize.ToString());
MessageBox.Show(myBitmapMetadata2.IsReadOnly.ToString());
MessageBox.Show(myBitmapMetadata2.Format.ToString());
MessageBox.Show(myBitmapMetadata2.Location.ToString());
encoder4.Frames = decoder2.Frames;
encoder4.Save(stream4);
stream4.Close();
Dim stream4 As New FileStream("image3.tif", FileMode.Create)
Dim myBitmapMetadata2 As New BitmapMetadata("tiff")
Dim encoder4 As New TiffBitmapEncoder()
MessageBox.Show(myBitmapMetadata2.IsFixedSize.ToString())
MessageBox.Show(myBitmapMetadata2.IsReadOnly.ToString())
MessageBox.Show(myBitmapMetadata2.Format.ToString())
MessageBox.Show(myBitmapMetadata2.Location.ToString())
encoder4.Frames = decoder2.Frames
encoder4.Save(stream4)
stream4.Close()

适用于