Skip to content

Commit 731c78d

Browse files
author
Evgeniy Sidenko
committed
Updated upto Aspose.Imaging for Java 21.12
1 parent e078e9f commit 731c78d

File tree

12 files changed

+36
-6
lines changed

12 files changed

+36
-6
lines changed

Examples/pom.xml

Lines changed: 2 additions & 2 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>21.11</version>
6+
<version>21.12</version>
77
<packaging>jar</packaging>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>
@@ -15,7 +15,7 @@
1515
<dependency>
1616
<groupId>com.aspose</groupId>
1717
<artifactId>aspose-imaging</artifactId>
18-
<version>21.11</version>
18+
<version>21.12</version>
1919
<classifier>jdk16</classifier>
2020
<type>jar</type>
2121
</dependency>

Examples/src/main/java/com/aspose/imaging/examples/ManipulatingPNGImages/ApplyFilterMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class ApplyFilterMethod
88
public static void main(String... args)
99
{
1010
Logger.startExample("ApplyFilterMethod");
11-
// The path to the documents directory.
11+
// The path to the documents' directory.
1212
String dataDir = Utils.getSharedDataDir() + "ManipulatingPNGImages/";
1313

1414
try (com.aspose.imaging.fileformats.png.PngImage png = (com.aspose.imaging.fileformats.png.PngImage) com.aspose.imaging.Image
@@ -21,7 +21,7 @@ public static void main(String... args)
2121
options.setFilterType(com.aspose.imaging.fileformats.png.PngFilterType.Paeth);
2222

2323
// Save changes to the disc
24-
png.save(Utils.getOutDir() + "ApplyFilterMethod_out.jpg", options);
24+
png.save(Utils.getOutDir() + "ApplyFilterMethod_out.png", options);
2525
}
2626
Logger.endExample();
2727
}

Examples/src/main/java/com/aspose/imaging/examples/ManipulatingPNGImages/SpecifyBitDepth.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.aspose.imaging.Image;
44
import com.aspose.imaging.examples.Logger;
5+
import com.aspose.imaging.examples.Path;
56
import com.aspose.imaging.examples.Utils;
67
import com.aspose.imaging.fileformats.png.PngColorType;
78
import com.aspose.imaging.fileformats.png.PngImage;
@@ -29,7 +30,7 @@ public static void main(String... args)
2930
options.setBitDepth((byte) 1);
3031

3132
// Save changes to the disc
32-
pngImage.save(Utils.getOutDir() + "SpecifyBitDepth_out.jpg", options);
33+
pngImage.save(Path.combine(Utils.getOutDir(), "SpecifyBitDepth_out.png"), options);
3334
}
3435
Logger.endExample();
3536
}

Examples/src/main/java/com/aspose/imaging/examples/ManipulatingPNGImages/SpecifyTransparencyUsingRasterImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void main(String... args)
2222
image.setTransparentColor(Color.getBlack());
2323
image.setTransparentColor(true);
2424
image.setBackgroundColor(true);
25-
image.save(Utils.getOutDir() + "SpecifyTransparencyforPNGImagesUsingRasterImage_out.jpg", new PngOptions());
25+
image.save(Utils.getOutDir() + "SpecifyTransparencyforPNGImagesUsingRasterImage_out.png", new PngOptions());
2626
}
2727
Logger.endExample();
2828
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.aspose.imaging.examples.ModifyingImages;
2+
3+
import com.aspose.imaging.Image;
4+
import com.aspose.imaging.examples.Logger;
5+
import com.aspose.imaging.examples.Path;
6+
import com.aspose.imaging.examples.Utils;
7+
8+
public class FileExtensionAwareSave
9+
{
10+
public static void main(String[] args)
11+
{
12+
Logger.startExample();
13+
14+
// The path to the documents' directory.
15+
String dataDir = Path.combine(Utils.getSharedDataDir(), "jpeg");
16+
String outputPath = Path.combine(Utils.getOutDir(), "output.png");
17+
18+
// Loading and Rotating Image
19+
try (Image image = Image.load(Path.combine(dataDir, "aspose-logo.jpg")))
20+
{
21+
image.save(outputPath);
22+
}
23+
24+
Utils.deleteFile(outputPath);
25+
26+
Logger.endExample();
27+
}
28+
}

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

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

115115
Logger.println("Running modifying and converting images tests:");
116+
FileExtensionAwareSave.main(args);
116117
ImageScopedFonts.main(args);
117118
BmpRLE4.main(args);
118119
MultipageFromImages.main(args);
14.8 KB
Loading
1.11 KB
Binary file not shown.
370 KB
Loading
74.4 KB
Loading

0 commit comments

Comments
 (0)