private void GenerateAndComparePngBill(Bill bill, SeparatorType separatorType,
                                        string expectedFileName)
 {
     bill.Format.SeparatorType = separatorType;
     using (PNGCanvas canvas =
                new PNGCanvas(QRBill.A4PortraitWidth, QRBill.A4PortraitHeight, 288, "Arial,Helvetica"))
     {
         QRBill.Draw(bill, canvas);
         FileComparison.AssertGrayscaleImageContentsEqual(canvas.ToByteArray(), expectedFileName);
     }
 }
        private void PngBillQrBill()
        {
            Bill bill = SampleData.CreateExample1();

            byte[] svg;
            using (PNGCanvas canvas = new PNGCanvas(QRBill.QrBillWidth, QRBill.QrBillHeight, 300, "Arial"))
            {
                bill.Format.OutputSize = OutputSize.QrBillOnly;
                QRBill.Draw(bill, canvas);
                svg = canvas.ToByteArray();
            }

            FileComparison.AssertGrayscaleImageContentsEqual(svg, "qrbill_ex1.png");
        }
        private void PngBillA4()
        {
            Bill bill = SampleData.CreateExample3();

            byte[] png;
            using (PNGCanvas canvas =
                       new PNGCanvas(QRBill.A4PortraitWidth, QRBill.A4PortraitHeight, 144, "Arial,Helvetica"))
            {
                bill.Format.OutputSize = OutputSize.A4PortraitSheet;
                QRBill.Draw(bill, canvas);
                png = canvas.ToByteArray();
            }

            FileComparison.AssertGrayscaleImageContentsEqual(png, "a4bill_ex3.png");
        }