Write barcode png into file.

Add optional parameter to write into file.