1. A method comprising: receiving, by a computer system, a plurality of image transformations in a user-selected ordering; applying, by the computer system, one or more ordering cost functions to one or more possible orderings of the plurality of image transformations, each ordering cost function comprising a plurality of transformation cost functions, and each transformation cost function being associated with an image transformation; determining, by the computer system, computing costs for each of the one or more applied ordering cost functions; and selecting, by the computer system, from the one or more possible orderings of the plurality of image transformations, an optimal ordering of the plurality of image transformations based on the determined computing costs.