Skip to content

Commit 6a83c20

Browse files
author
Evgeniy Sidenko
committedNov 12, 2024
Updated to 24.11
1 parent 775442c commit 6a83c20

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
 

‎Examples/data/avif/example.avif

852 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)