float mx = (u * rx) - x;
float my = (v * ry) - y;
x = x%rx;
y = y%ry;
Vector4 c0 = Utils.RGBAToVector4(img.getRGB(x, y));
Vector4 c1 = Utils.RGBAToVector4(img.getRGB((x+1)%rx, y));
Vector4 c2 = Utils.RGBAToVector4(img.getRGB(x, (y+1)%ry));
Vector4 c3 = Utils.RGBAToVector4(img.getRGB((x+1)%rx, (y+1)%ry));
c0.linearInterp_ip(mx, c1);
c2.linearInterp_ip(mx, c3);
c0.linearInterp_ip(my, c2);