TQRCode Class

Delphi Quricol

QR Code generator

QuricolCode_TQRCode
Syntax
Pascal
TQRCode = class;
var
  bmp : TBitmap;
  MS : TMemoryStream;
begin
  try
    //Generate Windows bitmap and save to file
    TQRCode.GenerateBitmapFile('delphi1.bmp', 'http://delphi32.blogspot.com', QualityLow);

    //Generate PNG image and save to file
    TQRCode.GeneratePngFile('delphi1.png', 'http://delphi32.blogspot.com');

    //Generate TBitmap
    bmp := TQRCode.GetBitmapImage('http://www.krento.net');
    bmp.SaveToFile('delphi2.bmp');

    //Generate PNG to the memory stream
    MS := TMemoryStream.Create;
    TQRCode.GetPngStream(MS, 'http://www.krento.net');
    MS.Position := 0;
    MS.SaveToFile('delphi2.png');
    MS.Free;

  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
Copyright (c) Serhiy Perevoznyk, 2012. All rights reserved.