Propagate the format selection out of the Ruby code.
Expose PNG creation
Allow controlling the size via query parameters, for ease of use when
calling from Javascript.