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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s