We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 775442c commit 6a83c20Copy full SHA for 6a83c20
Examples/data/avif/example.avif
852 Bytes
Examples/src/modifyingandconvertingimages/avif/AvifLoadExample.py
@@ -0,0 +1,24 @@
1
+from aspose.imaging import Image
2
+import os
3
+
4
5
+# Initialization
6
+def get_data_root_dir_local():
7
+ if 'BASE_DIR' in os.environ:
8
+ return os.environ["BASE_DIR"]
9
+ return "."
10
11
12
+if 'get_data_root_dir' not in dir():
13
+ get_data_root_dir = get_data_root_dir_local
14
15
+# Example code:
16
+print("Running example AvifLoadExample")
17
+data_dir = os.path.join(get_data_root_dir(), 'avif')
18
+file_name = "example.avif"
19
+input_file_path = os.path.join(data_dir, file_name)
20
+with Image.load(input_file_path) as image:
21
+ print(f"Avif image is loaded! Format: {image.file_format}")
22
+ print(f"Size: {image.size}");
23
24
+print("Finished example AvifLoadExample")
0 commit comments