|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Shinya Kitaoka |
810553 |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef igs_levels_h
|
|
Toshihiro Shimizu |
890ddd |
#define igs_levels_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IGS_LEVELS_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#define IGS_LEVELS_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
namespace igs {
|
|
Shinya Kitaoka |
120a6e |
namespace levels {
|
|
Toshihiro Shimizu |
890ddd |
IGS_LEVELS_EXPORT void change(
|
|
Shinya Kitaoka |
120a6e |
unsigned char *image_array, const int height, const int width,
|
|
Shinya Kitaoka |
120a6e |
const int channels, const int bits
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const unsigned char *ref /* 求める画像と同じ高、幅、channels数 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const int ref_bits /* refがゼロのときはここもゼロ */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const int ref_mode /* 0=R,1=G,2=B,3=A,4=Luminance,5=Nothing */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double r_in_min, const double r_in_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double g_in_min, const double g_in_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double b_in_min, const double b_in_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double a_in_min, const double a_in_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double r_gamma // 0.1 ... 10.0
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double g_gamma // 0.1 ... 10.0
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double b_gamma // 0.1 ... 10.0
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double a_gamma // 0.1 ... 10.0
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double r_out_min, const double r_out_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double g_out_min, const double g_out_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double b_out_min, const double b_out_max // 0...1
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double a_out_min, const double a_out_max // 0...1
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const bool clamp_sw,
|
|
Shinya Kitaoka |
120a6e |
const bool alpha_sw /* Alphaチャンネルを処理するか否かのSW */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const bool add_blend_sw
|
|
Shinya Kitaoka |
120a6e |
/* 効果(変化量)をアルファブレンドするか否かのスイッチ
|
|
Shinya Kitaoka |
120a6e |
add_blend_sw == true
|
|
Shinya Kitaoka |
120a6e |
アルファ値によりRGBの変化量を調整する
|
|
Shinya Kitaoka |
120a6e |
合成方法が
|
|
Shinya Kitaoka |
120a6e |
合成画 = 下絵 * (1 - alpha) + 上絵
|
|
Shinya Kitaoka |
120a6e |
の場合こちらを使う
|
|
Shinya Kitaoka |
120a6e |
add_blend_sw == false
|
|
Shinya Kitaoka |
120a6e |
アルファ値に関係なくRGBが変化する
|
|
Shinya Kitaoka |
120a6e |
合成方法が
|
|
Shinya Kitaoka |
120a6e |
合成画 = 下絵 * (1 - alpha) + 上絵 * alpha
|
|
Shinya Kitaoka |
120a6e |
の場合こちらを使う
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_levels_h */
|