def create_barcode(opts = {})
      path = barcode_path
      FileUtils.mkdir_p File.dirname(path)
      File.open(path, 'wb') do |f|
        f.write barcode(opts).to_png(self.class.options.merge(opts))
      end
      FileUtils.chmod(0666 &~ File.umask, path)
    end
def create_barcode(opts = {})
      path = barcode_path
      FileUtils.mkdir_p File.dirname(path)
      File.open(path, 'wb') do |f|
        f.write barcode(opts).to_png(self.class.options.merge(opts))
      end
      FileUtils.chmod(0666 &~ File.umask, path)
    end
Writes a barcode PNG image.

 opts:
 :subset - specify the Code128 subset to use ('A', 'B', or 'C').
 remaining options passed through to PNGOutputter.