MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / make_landscape

Function make_landscape

Test/astc_test_image_dl.py:55–65  ·  view source on GitHub ↗

Modify an existing image on disk to make it landscape aspect. Args: file_path: The path of the image on disk.

(file_path: Path)

Source from the content-addressed store, hash-verified

53
54
55def make_landscape(file_path: Path) -> None:
56 '''
57 Modify an existing image on disk to make it landscape aspect.
58
59 Args:
60 file_path: The path of the image on disk.
61 '''
62 image = Image.open(file_path)
63 if image.size[0] < image.size[1]:
64 rotated_image = image.rotate(90, expand=True)
65 rotated_image.save(file_path)
66
67
68def make_mixed_image(srca_path: Path, srcb_path: Path, dst_path: Path) -> None:

Callers 1

retrieve_kodak_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected