The fastest production-ready image resize out there, part 1: general optimizations