中级会员
 
- 积分
- 251
- 金钱
- 251
- 注册时间
- 2019-8-7
- 在线时间
- 51 小时
|
10金钱
我的屏幕是1024*600的
if(lcddev.height >= 800)
{
yoffset = (lcddev.height - 800) / 2;
outputheight = 800;
}
else
{
yoffset = 0;
outputheight = lcddev.height;
}
/***********************************************/
改模式:
if(scale == 0)
{
fac = 800 / outputheight; //得到比例因子
OV5640_OutSize_Set((1280 - fac * lcddev.width) / 2, (800 - fac * outputheight) / 2, lcddev.width, outputheight);
sprintf((char*)msgbuf, "Full Size 1:1");
}
else
{
OV5640_OutSize_Set(4, 0, lcddev.width, outputheight);
sprintf((char*)msgbuf, "Scale");
}
问题:
OV5640_OutSize_Set((1280 - fac * lcddev.width) / 2, (800 - fac * outputheight) / 2, lcddev.width, outputheight);
这一句
1280 - fac * lcddev.width=1280-800/600*1024=1280-1365怎么是负的?
|
|