if dump flag is set, also a binary dump of all samples is dumped.

TODO: include width and height