0

私は困っています。c# でビットマップ クラスを使用して 1MB の .tif ファイルを読み取り、XY 座標に基づいてこの .tif 画像のピクセル値を表示する方法。私はグーグルでたくさん検索しましたが、まだ答えが見つかりません。

string imgPath;
            imgPath = @"C:\Documents and Settings\shree\Desktop\2012.06.09.15.35.42.2320.tif";


            Bitmap img;
            img = new Bitmap(imgPath, true);

            MessageBox.Show(Here i have to show pixel value of this .tif image on the basis of X Y coordinates.);
4

1 に答える 1

2

これを試して

string imgPath;
imgPath = @"C:\Documents and Settings\shree\Desktop\2012.06.09.15.35.42.2320.tif";

Bitmap img;
img = new Bitmap(imgPath, true);

Color pixelColor = img.GetPixel(50, 50); // 50, 50 or any "VALID" pixel in your bitmap

詳細については、こちらをご覧ください

于 2012-06-23T05:43:48.157 に答える