예제 #1
0
    public int prSaveMRZImage()
    {
        try
        {
            if (_doc.IsValid())
            {
                /* Saving the MRZ image */
                gxImage img = _doc.FieldImage((int)(PR_DOCFIELD.PR_DF_MRZ1 & PR_DOCFIELD.PR_DF_MRZ2));
                if (img.IsValid())
                {
                    img.Save("mrz.jpg", (int)GX_IMGFILEFORMATS.GX_JPEG);
                }

                //_doc.Free();
                //_doc = null;
                //_pr.ResetDocument();
            }
        }
        catch (Exception e)
        {
            _errorMessage = e.Message + " --- prSaveMRZImage()";
            return(1305);
        }

        return(0);
    }
예제 #2
0
    public int prGetMRZImage(out byte[] buff)
    {
        buff = null;

        try
        {
            if (_doc.IsValid())
            {
                /* Creating a MRZ image */
                gxImage img = _doc.FieldImage((int)(PR_DOCFIELD.PR_DF_MRZ1 & PR_DOCFIELD.PR_DF_MRZ2));
                if (img.IsValid())
                {
                    buff = img.SaveToMem((int)GX_IMGFILEFORMATS.GX_JPEG);
                }
            }
        }
        catch (Exception e)
        {
            _errorMessage = e.Message + " --- prGetMRZImage()";
            return(1305);
        }

        return(0);
    }