diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-11-19 06:28:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-11-19 06:28:07 +0300 |
commit | f8e56e96bf2be4580dd34c33c6379339642638f0 (patch) | |
tree | 2c63e34f6c8b3c43c29ada03cf108e8b82d5723e /source/blender/imbuf/IMB_imbuf.h | |
parent | a4776347ea5946aa70a5a77ee5628817f995d4d8 (diff) |
Split up the following imbuf functions in 2...
void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
Added...
void bicubic_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void neareast_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void bilinear_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
This is needed so for projection painting but generally useful if you want to get the interpolated color of a pixel in an image without having a destination imbuf.
While editing these I noticed the functons are a bit dodgy, they assume the input ImBuf has matching float/chr buffer to the output.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf.h')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index d4d8030bf10..8bc1439fd09 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -403,9 +403,14 @@ void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf); * * @attention defined in imageprocess.c */ -void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float x, float y, int xout, int yout); +void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout); void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout); void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout); + +void bicubic_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v); +void neareast_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v); +void bilinear_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v); + /** * Change the ordering of the color bytes pointed to by rect from * rgba to abgr. size * 4 color bytes are reordered. |