Пример #1
0
void neareast_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, int yout)
{
	
	unsigned char *outI = NULL;
	float *outF = NULL;

	if (in == NULL || (in->rect == NULL && in->rect_float == NULL)) return;
	
	pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */
	
	neareast_interpolation_color(in, outI, outF, x, y);
}
Пример #2
0
void bilinear_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, int yout)
{
	unsigned char *outI = NULL;
	float *outF = NULL;

	if (in == NULL || (in->rect == NULL && in->rect_float == NULL)) {
		return;
	}

	pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */

	bilinear_interpolation_color(in, outI, outF, u, v);
}