Skip to content

Commit

Permalink
Merge pull request #128 from JanardhanBS-SyncByte/develop
Browse files Browse the repository at this point in the history
[MOSIP-31942]
  • Loading branch information
ckm007 authored Mar 12, 2024
2 parents 0ee9c80 + 91a45d8 commit c33fd22
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
with:
SERVICE_LOCATION: 'kernel-biometrics-api'
secrets:
OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
*/target/
*/target/
/.metadata/
8 changes: 6 additions & 2 deletions biometrics-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.mosip.biometric.util</groupId>
<artifactId>biometrics-util</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0.2-SNAPSHOT</version>
<name>biometrics-util</name>
<url>http://maven.apache.org</url>
<description>This utility is used to convert ISO to Image and Image to ISO</description>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand All @@ -20,10 +21,13 @@
<github.mhshams.jnbis.version>2.0.2</github.mhshams.jnbis.version>
<openpnp-opencv.version>4.5.3-4</openpnp-opencv.version>
<lombok.version>1.18.24</lombok.version>
<kernel.version>1.2.1-SNAPSHOT</kernel.version>

<!-- Mosip kernel -->
<kernel.core.version>1.2.0.1</kernel.core.version>
<fasterxml.jackson.version>2.15.0</fasterxml.jackson.version>
<hibernate-validator.version>8.0.0.Final</hibernate-validator.version>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,36 @@ public boolean isValidImageSpatialSamplingRateVertical(int scanSpatialSamplingRa
return false;
}

public boolean isValidBitDepth(int bitDepth, ImageDecoderRequestDto decoderRequestDto) {
/**
* Validates bit depth of a given image byte array
* @deprecated
* This method will not be acceptable in future versions.
* <p> Use {@link isValidBitDepth(bitDepth, ImageDecoderRequestDto)} instead.
*
* @param imageData image byte array
* @param bitDepth image bit depth
* @return true or false
*/
@Deprecated
public boolean isValidBitDepth(byte[] imageData, int bitDepth) {
if (bitDepth == FingerImageBitDepth.BPP_08)
{
// need to check depth in image also
if (decoderRequestDto.getDepth() == 8)// GRAY 8 bit images
return true;
}
return false;
}

/**
* Validates bit depth of a using decoded image information
* @param bitDepth image bit depth
* @param decoderRequestDto ImageDecoderRequestDto contains decoded image information
* @return true or false
*/
public boolean isValidBitDepth(int bitDepth, ImageDecoderRequestDto decoderRequestDto) {
if (bitDepth == FingerImageBitDepth.BPP_08)
{
if (decoderRequestDto.getDepth() == FingerImageBitDepth.BPP_08)// GRAY 8 bit images
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,36 @@ public boolean isValidImageHeight(String purpose, int imageHeight, ImageDecoderR
return false;
}

public boolean isValidBitDepth(int bitDepth, ImageDecoderRequestDto decoderRequestDto) {
/**
* Validates bit depth of a given image byte array
* @deprecated
* This method will not be acceptable in future versions.
* <p> Use {@link isValidBitDepth(bitDepth, ImageDecoderRequestDto)} instead.
*
* @param imageData image byte array
* @param bitDepth image bit depth
* @return true or false
*/
@Deprecated
public boolean isValidBitDepth(byte[] imageData, int bitDepth) {
if (bitDepth == IrisImageBitDepth.BPP_08)
{
// need to check depth in image also
if (decoderRequestDto.getDepth() == 8) // gray scale 8 bit depth
return true;
}
return false;
}

/**
* Validates bit depth of a using decoded image information
* @param bitDepth image bit depth
* @param decoderRequestDto ImageDecoderRequestDto contains decoded image information
* @return true or false
*/
public boolean isValidBitDepth(int bitDepth, ImageDecoderRequestDto decoderRequestDto) {
if (bitDepth == IrisImageBitDepth.BPP_08)
{
if (decoderRequestDto.getDepth() == IrisImageBitDepth.BPP_08) // gray scale 8 bit depth
return true;
}
return false;
Expand Down
7 changes: 5 additions & 2 deletions kernel-biometrics-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-biometrics-api</artifactId>

<version>1.2.1-SNAPSHOT</version>
<version>1.2.0.2-SNAPSHOT</version>
<name>kernel-biometrics-api</name>
<description>biometrics api definitions</description>
<url>https://github.com/mosip/commons</url>
Expand Down Expand Up @@ -221,8 +221,11 @@
<aspectjweaver.version>1.8.12</aspectjweaver.version>
<micrometer.core.version>1.4.2</micrometer.core.version>
<micrometer.registry.prometheus.version>1.4.2</micrometer.registry.prometheus.version>
<kernel.core.version>1.2.1-SNAPSHOT</kernel.core.version>
<kernel.core.version>1.2.0.1</kernel.core.version>
<jacoco.maven.plugin.version>0.8.5</jacoco.maven.plugin.version>

<!-- Mosip kernel -->
<kernel.core.version>1.2.0.1</kernel.core.version>
</properties>


Expand Down
16 changes: 11 additions & 5 deletions kernel-biosdk-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<artifactId>kernel-biosdk-provider</artifactId>
<groupId>io.mosip.kernel</groupId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0.2-SNAPSHOT</version>
<name>kernel-biosdk-provider</name>
<description>Implementation of biosdk provider</description>
<url>https://github.com/mosip/commons</url>
Expand Down Expand Up @@ -118,10 +118,16 @@
<aspectjweaver.version>1.8.12</aspectjweaver.version>
<micrometer.core.version>1.4.2</micrometer.core.version>
<micrometer.registry.prometheus.version>1.4.2</micrometer.registry.prometheus.version>
<kernel.core.version>1.2.1-SNAPSHOT</kernel.core.version>
<kernel.biometricsdk.version>1.2.1-SNAPSHOT</kernel.biometricsdk.version>
<kernel.logger.logback.version>1.2.1-SNAPSHOT</kernel.logger.logback.version>
<kernel.core.version>1.2.0.1</kernel.core.version>
<kernel.biometricsdk.version>1.2.0.1</kernel.biometricsdk.version>
<kernel.logger.logback.version>1.2.0.1</kernel.logger.logback.version>
<jacoco.maven.plugin.version>0.8.5</jacoco.maven.plugin.version>

<!-- Mosip kernel -->
<kernel.core.version>1.2.0.1</kernel.core.version>
<kernel.biometricsdk.version>1.2.0.1</kernel.biometricsdk.version>
<kernel.biometrics-api.version>1.2.0.2-SNAPSHOT</kernel.biometrics-api.version>
<kernel.logger.logback.version>1.2.0.1</kernel.logger.logback.version>
</properties>

<dependencies>
Expand All @@ -139,7 +145,7 @@
<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-biometrics-api</artifactId>
<version>${kernel.biometricsdk.version}</version>
<version>${kernel.biometrics-api.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
12 changes: 8 additions & 4 deletions kernel-cbeffutil-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-cbeffutil-api</artifactId>
<version>1.2.1-SNAPSHOT</version>

<version>1.2.0.2-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down Expand Up @@ -219,8 +218,13 @@
<micrometer.core.version>1.4.2</micrometer.core.version>
<micrometer.registry.prometheus.version>1.4.2</micrometer.registry.prometheus.version>
<sonar.skip>true</sonar.skip>
<kernel.core.version>1.2.1-SNAPSHOT</kernel.core.version>
<kernel.core.version>1.2.0.1</kernel.core.version>
<kernel-biometrics-api.version>1.2.0.2</kernel-biometrics-api.version>
<jacoco.maven.plugin.version>0.8.5</jacoco.maven.plugin.version>

<!-- Mosip kernel -->
<kernel.core.version>1.2.0.1</kernel.core.version>
<kernel-biometrics-api.version>1.2.0.2-SNAPSHOT</kernel-biometrics-api.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -243,7 +247,7 @@
<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-biometrics-api</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>${kernel-biometrics-api.version}</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<groupId>io.mosip.bio.utils</groupId>
<artifactId>bioutils</artifactId>
<packaging>jar</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0.2-SNAPSHOT</version>
<name>bioutils</name>
<url>http://maven.apache.org</url>

Expand All @@ -22,10 +22,10 @@
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<openpnp-opencv.version>4.5.3-4</openpnp-opencv.version>
<lombok.version>1.18.24</lombok.version>
<kernel.core.version>1.2.0.1-B1</kernel.core.version>
<kernel.core.version>1.2.0.1</kernel.core.version>
<fasterxml.jackson.version>2.15.0</fasterxml.jackson.version>
<hibernate-validator.version>8.0.0.Final</hibernate-validator.version>
<biometrics-util.version>1.2.0.1-B2-SNAPSHOT</biometrics-util.version>
<biometrics-util.version>1.2.0.2-SNAPSHOT</biometrics-util.version>
<!-- fasterxml jackson-->
<com.fasterxml.jackson.version>2.15.0</com.fasterxml.jackson.version>
<okhttp.version>2.7.5</okhttp.version>
Expand Down Expand Up @@ -215,4 +215,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

0 comments on commit c33fd22

Please sign in to comment.