Quricol Delphi sample

Update 11.09.2013: Quricol 2.0 is available for download. More information about this version on http://delphi32.blogspot.com/2013/09/quricol-20-qr-code-generator.html
program QuricolDemo;



{$APPTYPE CONSOLE}



uses

  SysUtils,

  Graphics,

  Classes,

  QuricolCodeAnsi in 'QuricolCodeAnsi.pas';



var

  bmp : TBitmap;

  MS : TMemoryStream;

begin

  try

    //Generate Windows bitmap and save to file

    TQRCode.GenerateBitmap('delphi1.bmp', 'http://delphi32.blogspot.com');



    //Generate PNG image and save to file

    TQRCode.GeneratePng('delphi1.png', 'http://delphi32.blogspot.com');



    //Generate TBitmap

    bmp := TQRCode.GetBitmap('http://www.krento.net');

    bmp.SaveToFile('delphi2.bmp');



    //Generate PNG to the memory stream

    MS := TMemoryStream.Create;

    TQRCode.GetPng(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;

end.

Comments

Popular posts from this blog

Quricol - QR code generator library

EIDNative Library 2.0 released

Quricol 2.0 - QR Code generator