次の例は、特定の BmpBitmapDecoder オブジェクトと BmpBitmapEncoder オブジェクトを使用して、ビットマップ (BMP) イメージをデコードおよびエンコードする方法を示しています。 BMP イメージをデコードする この例では、Uri の BmpBitmapDecoder を使用して BMP イメージをデコードする方法を示します。 // Open a Uri and decode a BMP image System::Uri^ myUri = gcnew System::Uri("tulipfarm.bmp", UriKind::RelativeOrAbsolute); BmpBitmapDecoder^ decoder2 = gcnew BmpBitmapDecoder(myUri, BitmapCreateOptions::PreservePixelFor