Added compression level argument to Canvas::toBuffer