본문내용
i_orgc>widthm1)
{
where=r*width+c;
pRotationImg[where]=0;
}
else
{
I1=(float)m_InImg[i_orgr][i_orgc];//(org_r,org_c)
I2=(float)m_InImg[i_orgr][i_orgc+1];//(org_r,org_c+1)
I3=(float)m_InImg[i_orgr+1][i_orgc+1];//(org_r+1,org_c+1)
I4=(float)m_InImg[i_orgr+1][i_orgc];//(org_r+1,org_c)
newValue=(BYTE)(I1*(1-sc)*(1-sr)+I2*sc*(1-sr)+I3*sc*sr+I4*(1-sc)*sr);
where=r*width+c;
pRotationImg[where]=newValue;
}
}
for(r=0;r
for(c=0;c
{
m_OutImg[r][c]=pRotationImg[r*width+c];
}
delete [] pRotationImg;
}
< 실행 결과 >
※ 왼쪽 마우스 버튼 클릭으로 처음 좌표 값 입력
※ 오른쪽 마우스 버튼 클릭으로 두 번째 좌표 값 입력
※ 실행 결과 화면
{
where=r*width+c;
pRotationImg[where]=0;
}
else
{
I1=(float)m_InImg[i_orgr][i_orgc];//(org_r,org_c)
I2=(float)m_InImg[i_orgr][i_orgc+1];//(org_r,org_c+1)
I3=(float)m_InImg[i_orgr+1][i_orgc+1];//(org_r+1,org_c+1)
I4=(float)m_InImg[i_orgr+1][i_orgc];//(org_r+1,org_c)
newValue=(BYTE)(I1*(1-sc)*(1-sr)+I2*sc*(1-sr)+I3*sc*sr+I4*(1-sc)*sr);
where=r*width+c;
pRotationImg[where]=newValue;
}
}
for(r=0;r
m_OutImg[r][c]=pRotationImg[r*width+c];
}
delete [] pRotationImg;
}
< 실행 결과 >
※ 왼쪽 마우스 버튼 클릭으로 처음 좌표 값 입력
※ 오른쪽 마우스 버튼 클릭으로 두 번째 좌표 값 입력
※ 실행 결과 화면