Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finger Print Position not set in HighResolutionGrayscaleFingerprintReader #29

Closed
ychawla opened this issue Jan 22, 2021 · 1 comment
Closed

Comments

@ychawla
Copy link
Contributor

ychawla commented Jan 22, 2021

The finger print position is parsed but never set:

    // Finger position (FGP)
    int fingerPrintNo = token.buffer[token.pos + 6];

The value is null when parsing a finger print file. A line can be added to set the fingerPrintNo on the fingerPrint

https://github.com/mhshams/jnbis/blob/develop/src/main/java/org/jnbis/internal/record/reader/HighResolutionGrayscaleFingerprintReader.java#L34

@ychawla
Copy link
Contributor Author

ychawla commented Jan 26, 2021

Here is a patch:

diff --git a/src/main/java/org/jnbis/internal/record/reader/HighResolutionGrayscaleFingerprintReader.java b/src/main/java/org/jnbis/internal/record/reader/HighResolutionGrayscaleFingerprintReader.java
index a226887..9f8a15e 100644
--- a/src/main/java/org/jnbis/internal/record/reader/HighResolutionGrayscaleFingerprintReader.java
+++ b/src/main/java/org/jnbis/internal/record/reader/HighResolutionGrayscaleFingerprintReader.java
@@ -26,6 +26,7 @@

     // Finger position (FGP)
     int fingerPrintNo = token.buffer[token.pos + 6];
  •    fingerprint.setFingerPosition(String.valueOf(fingerPrintNo));
    
       //Impression type (IMP)
       int imp = token.buffer[token.pos + 5];
    

diff --git a/src/test/java/org/jnbis/SampleNistTest.java b/src/test/java/org/jnbis/SampleNistTest.java
index 584ab5a..c3fcc4b 100755
--- a/src/test/java/org/jnbis/SampleNistTest.java
+++ b/src/test/java/org/jnbis/SampleNistTest.java
@@ -45,6 +45,7 @@
if (fingerPrint.getImageDesignationCharacter().equals("1"))
{
Assert.assertEquals("3", fingerPrint.getImpressionType());

  •        	Assert.assertEquals("1", fingerPrint.getFingerPosition());
           	Assert.assertEquals("1", fingerPrint.getImageDesignationCharacter());
           	Assert.assertEquals("0", fingerPrint.getImageScanningResolution());
           	Assert.assertEquals("1", fingerPrint.getCompressionAlgorithm());
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant