anchor.diff:  // Set an Options record to default values
   function InitializeDatamatrixDecodeOptions:DatamatrixDecodeOptions;
   
  +// Prepare a bitmap for finding barcodes
  +function DIBtoImage(bitmap:TBitmap):PDmtxImage;
   // Decode a datamatrix barcode with default options
   procedure DecodeDatamatrix(bitmap:TBitmap;codes:TStrings);overload;
     // bitmap: a bitmap that can contain a datamatrix barcode
  
positive.code:   except
      result:=false;
    end;
  
  end;
  
  procedure DecodeMessage(msg:pDmtxMessage; region:pDMtxRegion; codes:TStrings;options:DatamatrixDecodeOptions);
  begin
    codes.Add(PAnsiChar(msg.output));
  end;
  
  
  
negative.code: // options can be set analogous to EncodeDatamatrix with options
  
  procedure RotateQuartiles(angle:integer;bitmap:TBitmap);
  
  Type
    TDataMatrixDecode = class(TObject)
    private
      fDecode:pDmtxDecode;
      fImage:PDmtxImage;
      fOptions:DatamatrixDecodeOptions;
      function GetStopafter: integer;
      function GettimeoutMS: integer;
      procedure SetStopAfter(const Value: integer);
      procedure SettimeoutMS(const Value: integer);
    public
      constructor Create(bitmap:TBitmap);
      destructor Destroy;override;
      procedure Decode(codes:TStrings);
      procedure DecodeRegion(codes:TStrings;rect:TRect);
      property StopAfter:integer read GetStopafter write SetStopAfter;
      property timeoutMS:integer read GettimeoutMS write SettimeoutMS;
    end;
  
  implementation
  const bufferSize=4096;
  