Optimized vectoized routines for the friday image library.