|
Toshihiro Shimizu |
890ddd |
#ifndef igs_maxmin_h
|
|
Toshihiro Shimizu |
890ddd |
#define igs_maxmin_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IGS_MAXMIN_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#define IGS_MAXMIN_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
namespace igs
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
namespace maxmin
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
IGS_MAXMIN_EXPORT void convert(
|
|
Toshihiro Shimizu |
890ddd |
/* 入出力画像 */
|
|
Toshihiro Shimizu |
890ddd |
const unsigned char *inn, unsigned char *out
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* inn,out,ref(bits以外)の形状(geometry) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int height, const int width, const int channels, const int bits
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* Pixel毎に効果の強弱(pixel reference) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const unsigned char *ref /* 求める画像(out)と同じ高、幅、ch数 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int ref_bits /* refがゼロのときはここもゼロ */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int ref_mode /* 0=R,1=G,2=B,3=A,4=Luminance,5=Nothing */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* 処理のための形状値(action geometry) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double radius /* =1.0 0...100...DOUBLE_MAX */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double smooth_outer_range /* =2.0 0...100...DOUBLE_MAX */
|
|
Toshihiro Shimizu |
890ddd |
/* smooth_outer_rangeは
|
|
Toshihiro Shimizu |
890ddd |
0だとスムースさはなく、隣接ピクセルが現れた瞬間変化
|
|
Toshihiro Shimizu |
890ddd |
1だとスムースな変化となる。元の形状を維持
|
|
Toshihiro Shimizu |
890ddd |
1より大きいと影響の範囲がひろがり絵はぼやけてくる
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int polygon_number /* =2 2...16...INT_MAX */
|
|
Toshihiro Shimizu |
890ddd |
/* polygon_numberで3以上の値で
|
|
Toshihiro Shimizu |
890ddd |
半径radiusの円に内接する多角形となる
|
|
Toshihiro Shimizu |
890ddd |
絵では、円の右端が開始点
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double roll_degree /* =0.0 0...360...DOUBLE_MAX */
|
|
Toshihiro Shimizu |
890ddd |
/* roll_degreeがプラスで時計回り方向に回転する
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* 処理の方法、動作スイッチ(action type/sw) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const bool min_sw /* =false */
|
|
Toshihiro Shimizu |
890ddd |
/* min_sw==trueだと、小さい値のピクセルを拡大する
|
|
Toshihiro Shimizu |
890ddd |
falseなら、大きい値のピクセルを拡大する
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const bool alpha_rendering_sw /* =true */
|
|
Toshihiro Shimizu |
890ddd |
/* alpha_rendering_sw==trueなら、
|
|
Toshihiro Shimizu |
890ddd |
alphaチャンネルにも処理を行う。
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const bool add_blend_sw /* =false */
|
|
Toshihiro Shimizu |
890ddd |
/* add_blend_sw==trueだと、黒が入り込むべきところに、
|
|
Toshihiro Shimizu |
890ddd |
alphaのマスクによってエッジが残ってしまう。
|
|
Toshihiro Shimizu |
890ddd |
よってfalse固定 --> でなく、、、2013-12-21
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* 高速化のためのスレッド指定(thread count for speed up) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int number_of_thread /* =1 1...24...INT_MAX */
|
|
Toshihiro Shimizu |
890ddd |
);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_maxmin_h */
|