public void extractTemplate()
 {
     template.size = (int)GRConstants.GR_MAX_SIZE_TEMPLATE;
     grfingerx.Extract(ref rawImage.img, rawImage.width, rawImage.height,
                       rawImage.Res, ref template.tpt, ref template.size,
                       (int)GRConstants.GR_DEFAULT_CONTEXT);
 }
        private TTemplate extractTemplate(TTemplate template)
        {
            int result;

            template.size = (int)GRConstants.GR_MAX_SIZE_TEMPLATE;
            result        = grfingerx.Extract(ref rawImage.img, rawImage.width, rawImage.height,
                                              rawImage.Res, ref template.tpt, ref template.size,
                                              (int)GRConstants.GR_DEFAULT_CONTEXT);

            if (result < 0)
            {
                template.size = 0;
                template      = null;
            }

            return(template);
        }