タイトルに言及します。私はガンマトーンカーブを描こうとしていますが、どうやってそれを行うのか分かりません。私は線形トーンカーブをうまくやることができますが、ガンマトーンカーブを描くときは、私はそれを完全に失います。 http://www.mediachance.com/pseam/help/curves.html(第1又は第2図)から参照としてC++ setpixel関数を使用してグラフにトーンカーブ(ガンマ)を描画する方法
#include <math.h>
static COLORREF red=RGB(255,0,0);
static COLORREF blue=RGB(0,0,255);
static COLORREF green=RGB(0,255,0);
iはグラフを描画することは簡単であるべきであるガンマトーンカーブ
for(int y=0; y<bih.biHeight; y++)
{
for(int x=0; x<bih.biWidth; x++)
{
SetPixel(hdc, x, bih.biHeight-x, red);
}
// The X axis of the graph
HPEN hLinePen1;
COLORREF qLineColor1;
qLineColor1 = RGB(255, 0, 0);
hLinePen1 = CreatePen(PS_SOLID, 2, qLineColor1);
hPenOld1 = (HPEN)SelectObject(hdc, hLinePen1);
line(hdc,0, bih.biHeight, bih.biWidth, bih.biHeight);
SelectObject(hdc, hPenOld1);
DeleteObject(hLinePen1);
// The Y axis of the graph
HPEN hLinePen2;
COLORREF qLineColor2;
qLineColor2 = RGB(255, 0, 0);
hLinePen2 = CreatePen(PS_SOLID, 2, qLineColor2);
hPenOld2 = (HPEN)SelectObject(hdc, hLinePen2);
line(hdc,0, bih.biHeight, 0, bih.biWidth-bih.biHeight);
SelectObject(hdc, hPenOld2);
DeleteObject(hLinePen2);
"私はリニアトーンカーブをうまくやることができますが、ガンマトーンカーブを描くにはどうすればいいですか"というコード、またはリンクはありますか? – desgraci