エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ヘッダ情報のないbyte配列からBitmapオブジェクトを作る - かずきのBlog@hatena
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
ヘッダ情報のないbyte配列からBitmapオブジェクトを作る - かずきのBlog@hatena
前にもやったSetPixelを使わずにBitmapの色を変える方法と同じ要領で private void Form1_Paint(object ... 前にもやったSetPixelを使わずにBitmapの色を変える方法と同じ要領で private void Form1_Paint(object sender, PaintEventArgs e) { byte[] dat = new byte[100 * 100 * 3]; for (int h = 0; h < 100; h++) { for (int w = 0; w < 100; w++) { // 真っ赤なデータを用意 int index = h * 100 * 3 + w * 3; dat[index] = 0; dat[index + 1] = 0; dat[index + 2] = 255; } } using (Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format24bppRgb)) { BitmapData bd = b