Inheritance diagram for ImageFilterSepia:


Public Member Functions | |
| char * | GetDescription () const |
| void | FilterFrame (uint8_t *pixels, int width, int height, double position, double frame_delta) |
Definition at line 130 of file image_filters.cc.
|
||||||||||||||||||||||||
|
Implements ImageFilter. Definition at line 138 of file image_filters.cc. 00139 {
00140 uint8_t r, g, b;
00141 uint8_t *p = pixels;
00142 while ( p < ( pixels + width * height * 3 ) )
00143 {
00144 r = *( p );
00145 g = *( p + 1 );
00146 b = *( p + 2 );
00147 r = ( uint8_t ) ( 0.299 * r + 0.587 * g + 0.114 * b );
00148 *p ++ = r < 225 ? ( int ) ( r + 30 ) : 0xff;
00149 *p ++ = r;
00150 *p ++ = r > 30 ? ( int ) ( r - 30 ) : 0;
00151 }
00152 }
|
|
|
Implements ImageFilter. Definition at line 133 of file image_filters.cc. 00134 {
00135 return _( "Sepia" );
00136 }
|
1.4.2