Outputs the lego pieces required to represent an image