掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Imageプロパティにビットマップを入れるには? (ID:63876)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
>bmp->FromFile(openFileDialog1->FileName); とりあえず、これはbmpにビットマップオブジェクトを読み込んでいるわけではありません。 FormFileはImageオブジェクトを返すstaticメソッドです。 以下適当にやってみた。 (1) Bitmap* bmp = Bitmap(Bitmap::FromFile("XXXX.bmp"), this->pictureBox1->Size); this->pictureBox1->Image = bmp; (2) Bitmap* bmp = gcnew Bitmap(this->pictureBox1->Height, this->pictureBox1->Width, Imaging::PixelFormat::Format24bppRgb); Image* img = Bitmap::FromFile("XXXX.bmp"); Graphics* g = Graphics::FromImage(bmp); g->DrawImage(img, 0, 0, bmp->Width, bmp->Height); this->pictureBox1->Image = bmp; (3) this->pictureBox1->Image = Bitmap::FromFile("XXXX.bmp");
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.