Skip to content

Commit ef2a631

Browse files
author
Evgeniy Sidenko
committed
Publish Aspose.Imaging for Java 25.6
1 parent b29a0c1 commit ef2a631

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-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.5</version>
6+
<version>25.6</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.5</version>
18+
<version>25.6</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>com.aspose</groupId>
2222
<artifactId>aspose-imaging</artifactId>
23-
<version>25.5</version>
23+
<version>25.6</version>
2424
<classifier>javadoc</classifier>
2525
</dependency>
2626
</dependencies>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.aspose.imaging.examples.ManipulatingPNGImages;
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.Utils;
7+
import com.aspose.imaging.imageoptions.PngOptions;
8+
9+
import java.io.File;
10+
11+
public class PngCompressionLevelExample
12+
{
13+
public static void main(String[] args)
14+
{
15+
Logger.startExample();
16+
17+
String dataDir = Utils.getSharedDataDir() + "Png" + File.separator;
18+
String outDir = Utils.getOutDir("Png") + File.separator;
19+
20+
try (RasterImage image = (RasterImage) Image.load(dataDir + "aspose_logo.png"))
21+
{
22+
for (int compression = 0; compression <= 10; compression++)
23+
{
24+
String outputFile = outDir + String.format("compressionTest%d.png", compression);
25+
PngOptions options = new PngOptions();
26+
options.setPngCompressionLevel(compression);
27+
image.save(outputFile, options);
28+
29+
Utils.deleteFile(outputFile);
30+
}
31+
}
32+
33+
Logger.endExample();
34+
}
35+
}

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

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

370+
PngCompressionLevelExample.main(args);
370371
ApplyFilterMethod.main(args);
371372
ChangeBackgroundColor.main(args);
372373
CompressingFiles.main(args);

0 commit comments

Comments
 (0)