O*d
4 楼
找到的package都太麻烦使用. 自己写了一个, 工作很好. 分成两步.
If source width or height is greater than targe width * 2 or target height *
2, reduce by half till the source width and height are within 2x of target
size. Then use bilinear interpolation to reduce size further to target size.
static double interpolate(double a, double b, double factor)
{
return (1.0 - factor) * a + factor * b;
}
/***************************************************************************
**
Use bilinear
If source width or height is greater than targe width * 2 or target height *
2, reduce by half till the source width and height are within 2x of target
size. Then use bilinear interpolation to reduce size further to target size.
static double interpolate(double a, double b, double factor)
{
return (1.0 - factor) * a + factor * b;
}
/***************************************************************************
**
Use bilinear
d*l
5 楼
看, 还是自己写最好吧.
得, 自问自答了.
*
size.
**
【在 O*******d 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 找到的package都太麻烦使用. 自己写了一个, 工作很好. 分成两步.
: If source width or height is greater than targe width * 2 or target height *
: 2, reduce by half till the source width and height are within 2x of target
: size. Then use bilinear interpolation to reduce size further to target size.
: static double interpolate(double a, double b, double factor)
: {
: return (1.0 - factor) * a + factor * b;
: }
: /***************************************************************************
: **
得, 自问自答了.
*
size.
**
【在 O*******d 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 找到的package都太麻烦使用. 自己写了一个, 工作很好. 分成两步.
: If source width or height is greater than targe width * 2 or target height *
: 2, reduce by half till the source width and height are within 2x of target
: size. Then use bilinear interpolation to reduce size further to target size.
: static double interpolate(double a, double b, double factor)
: {
: return (1.0 - factor) * a + factor * b;
: }
: /***************************************************************************
: **
相关阅读
信用分数知多少?Poor or Excellent?免费查询,尽快提高到700分有人用Boost.MPI吗?推荐个VISUAL STUDIO 2010和C++入门书吧tech question: how does oracle uses composite index?请问java应该看什么书C++里能否在运行时check一个object里的member的名字,并且找出其指针?C++ 菜鸟问一个关于template 的问题。前端和后端开发哪个好?简单的c code问题求电子书问个OO题MP一般都是TA设计的?这里的牛人很多,都读过标准吗问个参数读入和传递的设计问题JavaScript The Evil Partshow to export a class in a namespace in DLL?Python3 现在属于什么阶段?《Latex 教程》(LaTeX and Friends)英文版[PDF]Autoconf Archive 里怎么没有BOOST Math的宏呢Please Recommend a Book to Learn Python. Thanks!