Blender Git Loki

Git Commits -> Revision f8e56e9

Revision f8e56e9 by Campbell Barton (master)
November 19, 2008, 03:28 (GMT)
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.

Commit Details:

Full Hash: f8e56e96bf2be4580dd34c33c6379339642638f0
SVN Revision: 17499
Parent Commit: a477634
Lines Changed: +86, -65

2 Modified Paths:

/source/blender/imbuf/IMB_imbuf.h (+6, -1) (Diff)
/source/blender/imbuf/intern/imageprocess.c (+80, -64) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021