+
+ std::unique_ptr<Bitmap> pBitmap;
+ Image image;
+
+ r = image.Construct();
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an Image instance.");
+
+ // decode the bitmap
+ String iconPath = App::GetInstance()->GetAppRootPath() + L"res/bounds.png";
+ pBitmap.reset(image.DecodeN(iconPath, BITMAP_PIXEL_FORMAT_ARGB8888));
+ SysTryReturnResult(NID_NET_NFC, pBitmap != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ // scale the bitmap
+ r = pBitmap->Scale(Dimension(242, 242));
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to scale the bitmap.");
+
+ // draw the bitmap