Private
Public Access
Release 0.12.0
This commit is contained in:
1 parent
f74a658097
commit
7f6eeab39e
48 files changed
+3617
-1266
No files matched your search
@@ -1,6 +1,10 @@
|
||||
#ifndef SPATIAL_INTERPOLATION_H
|
||||
#define SPATIAL_INTERPOLATION_H
|
||||
static inline void blend_color(const unsigned char a[3],const unsigned char b[3],unsigned weight,unsigned char out[3]){
|
||||
for(unsigned c=0;c<3;c++)out[c]=(unsigned char)(((unsigned)a[c]*(65535-weight)+(unsigned)b[c]*weight+32767)/65535);
|
||||
static inline void blend_color(const unsigned char a[3], const unsigned char b[3], unsigned weight,
|
||||
unsigned char out[3]) {
|
||||
for (unsigned c = 0; c < 3; c++)
|
||||
out[c] =
|
||||
(unsigned char)(((unsigned)a[c] * (65535 - weight) + (unsigned)b[c] * weight + 32767) /
|
||||
65535);
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user