Skip to content

Commit

Permalink
Updated to 24.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Sidenko committed Aug 14, 2024
1 parent c6c3351 commit 775442c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Binary file added Examples/data/dicom/input.dcm
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# GROUP: TEST_FILE_FORMATS
from aspose.imaging import Image
import os


# Initialization
def get_data_root_dir_local():
if 'BASE_DIR' in os.environ:
return os.environ["BASE_DIR"]
return "."


if 'get_data_root_dir' not in dir():
get_data_root_dir = get_data_root_dir_local

if 'get_output_dir' not in dir():
get_output_dir = get_data_root_dir_local

# Example code:
# The path to the documents directory.
data_dir = os.path.join(get_data_root_dir(), 'dicom')
out_file = os.path.join(get_output_dir(), 'SupportDicomYBR422.png')

input_path = os.path.join(data_dir, "input.dcm")
with Image.load(input_path) as image:
image.save(out_file);

if 'SAVE_OUTPUT' not in os.environ:
os.remove(out_file)

0 comments on commit 775442c

Please sign in to comment.