Skip to content

Commit 29f7926

Browse files
author
Evgeniy Sidenko
committed
Updated to 24.11
1 parent 27c83f4 commit 29f7926

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
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>24.9</version>
6+
<version>24.11</version>
77
<packaging>jar</packaging>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>
@@ -15,14 +15,14 @@
1515
<dependency>
1616
<groupId>com.aspose</groupId>
1717
<artifactId>aspose-imaging</artifactId>
18-
<version>24.9</version>
18+
<version>24.11</version>
1919
<classifier>jdk16</classifier>
2020
<type>jar</type>
2121
</dependency>
2222
<dependency>
2323
<groupId>com.aspose</groupId>
2424
<artifactId>aspose-imaging</artifactId>
25-
<version>24.9</version>
25+
<version>24.11</version>
2626
<classifier>javadoc</classifier>
2727
<type>jar</type>
2828
</dependency>

Examples/src/main/java/com/aspose/imaging/examples/CDR/SupportOfCDR.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static void main(String[] args)
2525
long realFileFormat = Image.getFileFormat(inputFileName);
2626

2727
Assert.areEqual(expectedFileFormat, realFileFormat, "File format is incorrect!");
28+
Logger.endExample();
2829
}
2930
//ExEnd:SupportOfCDR
3031
}

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.aspose.imaging.examples;
22

3+
import com.aspose.imaging.License;
34
import com.aspose.imaging.examples.CDR.SupportOfCDR;
45
import com.aspose.imaging.examples.CMX.CMXToPNGConversion;
56
import com.aspose.imaging.examples.ConvertingImages.*;
@@ -45,6 +46,7 @@
4546
import com.aspose.imaging.examples.SVG.SVGToBMPConversion;
4647
import com.aspose.imaging.examples.SVG.UnifyExtractionOfRasterImagesEmbeddedInVectorFormats;
4748
import com.aspose.imaging.examples.WebP.OpenWebPFile;
49+
import com.aspose.imaging.examples.avif.LoadAvif;
4850
import com.aspose.imaging.examples.dicom.*;
4951
import com.aspose.imaging.examples.djvu.*;
5052
import com.aspose.imaging.examples.export.Bradleythreshold;
@@ -68,9 +70,12 @@ public class RunExamples
6870
{
6971
public static void main(String[] args) throws IOException, InterruptedException, InvocationTargetException, IllegalAccessException
7072
{
71-
// If you have a license, please uncomment followed lines
72-
// License lic = new License();
73-
// lic.setLicense("fileOfYourLicense.lic");
73+
// If you have a license, please pass it as a first argument in the command line
74+
if (args.length > 0 && args[0].endsWith(".lic"))
75+
{
76+
License lic = new License();
77+
lic.setLicense(args[0]);
78+
}
7479

7580
Logger.println("Open public class RunExamples.java. \nIn main() method uncomment the example that you want to run.");
7681
Logger.println("Output dir is ", Utils.getOutDir());
@@ -111,6 +116,7 @@ public static void main(String[] args) throws IOException, InterruptedException,
111116
//// =====================================================
112117

113118
Logger.println("Running modifying and converting images tests:");
119+
LoadAvif.main(args);
114120
SupportDicomYBR422.main(args);
115121
RemoveAndSaveWithMetadata.main(args);
116122
ModifyDicomTags.main(args);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.aspose.imaging.examples.avif;
2+
3+
4+
import com.aspose.imaging.FileFormat;
5+
import com.aspose.imaging.Image;
6+
import com.aspose.imaging.examples.Logger;
7+
import com.aspose.imaging.examples.Utils;
8+
import com.aspose.imaging.fileformats.avif.AvifImage;
9+
10+
11+
public class LoadAvif
12+
{
13+
public static void main(String[] args)
14+
{
15+
Logger.startExample();
16+
// The path to the documents' directory.
17+
String baseFolder = Utils.getSharedDataDir() + "AVIF/";
18+
19+
try (AvifImage image = (AvifImage) Image.load(baseFolder + "example.avif"))
20+
{
21+
System.out.println("AVIF image is loaded! Format: " + FileFormat.toString(FileFormat.class, image.getFileFormat()));
22+
System.out.println("Size: " + image.getSize());
23+
}
24+
25+
Logger.endExample();
26+
}
27+
}
852 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)