Bilinear filtering now works, but only for scaling images up, still not fully optimized