Enable user to set different width and height

In my case the images in the sprite are not rectangular, so I need to be able to set different with and height (i.e. non-rectangular). My change maintains backwards compatibility so the size property can be either a number or an object with width and height properties.