Skip to content

Commit

Permalink
Updated to 24.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Sidenko committed Nov 12, 2024
1 parent 27c83f4 commit 29f7926
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aspose</groupId>
<artifactId>imaging-java-examples</artifactId>
<version>24.9</version>
<version>24.11</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand All @@ -15,14 +15,14 @@
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-imaging</artifactId>
<version>24.9</version>
<version>24.11</version>
<classifier>jdk16</classifier>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-imaging</artifactId>
<version>24.9</version>
<version>24.11</version>
<classifier>javadoc</classifier>
<type>jar</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void main(String[] args)
long realFileFormat = Image.getFileFormat(inputFileName);

Assert.areEqual(expectedFileFormat, realFileFormat, "File format is incorrect!");
Logger.endExample();
}
//ExEnd:SupportOfCDR
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.aspose.imaging.examples;

import com.aspose.imaging.License;
import com.aspose.imaging.examples.CDR.SupportOfCDR;
import com.aspose.imaging.examples.CMX.CMXToPNGConversion;
import com.aspose.imaging.examples.ConvertingImages.*;
Expand Down Expand Up @@ -45,6 +46,7 @@
import com.aspose.imaging.examples.SVG.SVGToBMPConversion;
import com.aspose.imaging.examples.SVG.UnifyExtractionOfRasterImagesEmbeddedInVectorFormats;
import com.aspose.imaging.examples.WebP.OpenWebPFile;
import com.aspose.imaging.examples.avif.LoadAvif;
import com.aspose.imaging.examples.dicom.*;
import com.aspose.imaging.examples.djvu.*;
import com.aspose.imaging.examples.export.Bradleythreshold;
Expand All @@ -68,9 +70,12 @@ public class RunExamples
{
public static void main(String[] args) throws IOException, InterruptedException, InvocationTargetException, IllegalAccessException
{
// If you have a license, please uncomment followed lines
// License lic = new License();
// lic.setLicense("fileOfYourLicense.lic");
// If you have a license, please pass it as a first argument in the command line
if (args.length > 0 && args[0].endsWith(".lic"))
{
License lic = new License();
lic.setLicense(args[0]);
}

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

Logger.println("Running modifying and converting images tests:");
LoadAvif.main(args);
SupportDicomYBR422.main(args);
RemoveAndSaveWithMetadata.main(args);
ModifyDicomTags.main(args);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.aspose.imaging.examples.avif;


import com.aspose.imaging.FileFormat;
import com.aspose.imaging.Image;
import com.aspose.imaging.examples.Logger;
import com.aspose.imaging.examples.Utils;
import com.aspose.imaging.fileformats.avif.AvifImage;


public class LoadAvif
{
public static void main(String[] args)
{
Logger.startExample();
// The path to the documents' directory.
String baseFolder = Utils.getSharedDataDir() + "AVIF/";

try (AvifImage image = (AvifImage) Image.load(baseFolder + "example.avif"))
{
System.out.println("AVIF image is loaded! Format: " + FileFormat.toString(FileFormat.class, image.getFileFormat()));
System.out.println("Size: " + image.getSize());
}

Logger.endExample();
}
}
Binary file added Examples/src/main/resources/AVIF/example.avif
Binary file not shown.

0 comments on commit 29f7926

Please sign in to comment.