Generate a 9-patch image from an iOS image and its left and top end caps