Skip to content

Commit c2799c9

Browse files
author
Evgeniy Sidenko
committed
Published Aspose.Imaging for Java 25.9
1 parent 78d6697 commit c2799c9

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

Examples/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aspose</groupId>
55
<artifactId>imaging-java-examples</artifactId>
6-
<version>25.7</version>
6+
<version>25.9</version>
77
<packaging>jar</packaging>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>
@@ -15,12 +15,12 @@
1515
<dependency>
1616
<groupId>com.aspose</groupId>
1717
<artifactId>aspose-imaging</artifactId>
18-
<version>25.7</version>
18+
<version>25.9</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>com.aspose</groupId>
2222
<artifactId>aspose-imaging</artifactId>
23-
<version>25.7</version>
23+
<version>25.9</version>
2424
<classifier>javadoc</classifier>
2525
</dependency>
2626
</dependencies>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.aspose.imaging.examples.ModifyingImages;
2+
3+
import com.aspose.imaging.Image;
4+
import com.aspose.imaging.RasterImage;
5+
import com.aspose.imaging.examples.Logger;
6+
import com.aspose.imaging.examples.Path;
7+
import com.aspose.imaging.examples.Utils;
8+
9+
public class SupportOfDigitalSignature
10+
{
11+
public static void main(String[] args)
12+
{
13+
Logger.startExample();
14+
// The path to the documents' directory.
15+
String basePath = Utils.getSharedDataDir() + "Png";
16+
17+
//# Signing limitations:
18+
//# - The LSB steganography algorithm requires the image to be at least 8 pixels in width and height,
19+
// with a minimum of 16,384 total pixels.
20+
//# - Password must be at least 4 characters long.
21+
22+
// var password = "1234";
23+
// var filePath = "c:\sunflower.jpg";
24+
25+
//#################################### Example 1 ###############################
26+
//# Faster checking method with partial data extraction. #
27+
//# Set detectionThresholdPercentage value to 75% (default value). #
28+
//##############################################################################
29+
30+
String filePath = Path.combine(basePath, "00020.png");
31+
String password = "123456";
32+
try (RasterImage image = (RasterImage) Image.load(filePath))
33+
{
34+
image.embedDigitalSignature(password);
35+
36+
boolean isSigning = image.isDigitalSigned(password);
37+
System.out.println("Check signing result of file is: " + isSigning);
38+
}
39+
40+
Logger.endExample();
41+
}
42+
}

Examples/src/main/java/com/aspose/imaging/examples/RunExamples.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public static void main(String[] args) throws IOException, InterruptedException,
117117
//// =====================================================
118118

119119
Logger.println("Running modifying and converting images tests:");
120+
SupportOfDigitalSignature.main(args);
120121
AutoAdjustImageBrightness.main(args);
121122
UnifyUsageOfCommonOperations.main(args);
122123
LoadAvif.main(args);

0 commit comments

Comments
 (0)