1. A method of creating an image utilizing a central processing unit (CPU) and a graphics processing unit (GPU), the method comprising the steps of: representing, in memory, an image by an image graph wherein the image graph comprises one or more GPU programs represented as nodes in the image graph, inputs to the one or more GPU programs and outputs from the one or more GPU programs wherein the inputs and outputs are represented as links in the image graph; optimizing said image graph by running software on said CPU wherein optimizing comprises consolidating multiple GPU programs into one GPU program to create an optimized image graph; wherein optimizing said image graph further comprises: under control of said CPU, starting with the root GPU program, calling the following groups of objects for each GPU program that must be run in order that the root GPU program may run to render said image graph of GPU programs; one or more objects for analyzing whether two GPU programs may be combined, and performing a combination if said analysis is positive wherein analyzing comprises analysis of inputs to the two GPU programs and outputs from the two GPU programs; one or more objects for performing region of interest (ROI) and domain of definition (DOD) optimization, wherein the DOD comprises all places in an image that are explicitly defined and not transparent and the ROI comprises the portion of the input image that is necessary to compute the given output DOD; and using the CPU to determine if GPU programs may be combined; compiling said optimized image graph by running software on said CPU to create a compiled image graph; and rendering said image graph by running said compiled image graph on a GPU, yielding a rendered image.