fotolab 0.26.3__py3-none-any.whl → 0.27.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fotolab/__init__.py +1 -1
- fotolab/cli.py +4 -1
- fotolab/subcommands/montage.py +3 -0
- fotolab/subcommands/rotate.py +2 -6
- {fotolab-0.26.3.dist-info → fotolab-0.27.0.dist-info}/METADATA +1 -1
- {fotolab-0.26.3.dist-info → fotolab-0.27.0.dist-info}/RECORD +9 -9
- {fotolab-0.26.3.dist-info → fotolab-0.27.0.dist-info}/LICENSE.md +0 -0
- {fotolab-0.26.3.dist-info → fotolab-0.27.0.dist-info}/WHEEL +0 -0
- {fotolab-0.26.3.dist-info → fotolab-0.27.0.dist-info}/entry_points.txt +0 -0
fotolab/__init__.py
CHANGED
fotolab/cli.py
CHANGED
@@ -129,7 +129,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
129
129
|
version=f"%(prog)s {__version__}",
|
130
130
|
)
|
131
131
|
|
132
|
-
subparsers = parser.add_subparsers(
|
132
|
+
subparsers = parser.add_subparsers(
|
133
|
+
help="sub-command help",
|
134
|
+
dest="command",
|
135
|
+
)
|
133
136
|
fotolab.subcommands.build_subparser(subparsers)
|
134
137
|
|
135
138
|
return parser
|
fotolab/subcommands/montage.py
CHANGED
@@ -57,6 +57,9 @@ def run(args: argparse.Namespace) -> None:
|
|
57
57
|
for image_filename in args.image_filenames:
|
58
58
|
images.append(Image.open(image_filename.name))
|
59
59
|
|
60
|
+
if len(images) < 2:
|
61
|
+
raise ValueError("At least two images is required for montage")
|
62
|
+
|
60
63
|
total_width = sum(img.width for img in images)
|
61
64
|
total_height = max(img.height for img in images)
|
62
65
|
|
fotolab/subcommands/rotate.py
CHANGED
@@ -67,14 +67,10 @@ def run(args: argparse.Namespace) -> None:
|
|
67
67
|
"""
|
68
68
|
log.debug(args)
|
69
69
|
|
70
|
-
rotation = args.rotation
|
71
|
-
if args.clockwise:
|
72
|
-
rotation = -rotation
|
73
|
-
|
70
|
+
rotation = -args.rotation if args.clockwise else args.rotation
|
74
71
|
for image_filename in args.image_filenames:
|
75
72
|
original_image = Image.open(image_filename)
|
76
73
|
rotated_image = original_image.rotate(
|
77
|
-
rotation,
|
78
|
-
expand=True,
|
74
|
+
rotation, expand=True, resample=Image.Resampling.BICUBIC
|
79
75
|
)
|
80
76
|
save_image(args, rotated_image, image_filename, "rotate")
|
@@ -1,6 +1,6 @@
|
|
1
|
-
fotolab/__init__.py,sha256=
|
1
|
+
fotolab/__init__.py,sha256=JLPVtm3Ac88Il9-YmaGXkWsbUdbl71qnktYpM3BKhvo,2172
|
2
2
|
fotolab/__main__.py,sha256=aboOURPs_snOXTEWYR0q8oq1UTY9e-NxCd1j33V0wHI,833
|
3
|
-
fotolab/cli.py,sha256=
|
3
|
+
fotolab/cli.py,sha256=fwSpCFW64ACEhH9JZER9OqxULbBzm5eVtkch3E6wwv4,4365
|
4
4
|
fotolab/subcommands/__init__.py,sha256=l3DlIaJ3u3jGjnC1H1yV8LZ_nPqOLJ6gikD4BCaMAQ0,1129
|
5
5
|
fotolab/subcommands/animate.py,sha256=Zp0LPM7ktg6V2rIAP8pof2mmPAph_0O3TEySvg55-h8,2972
|
6
6
|
fotolab/subcommands/auto.py,sha256=p_e1f4mcrIFLqBXMNKvPQRDkNrAlK7FR6sdR5NAR0t8,2427
|
@@ -9,13 +9,13 @@ fotolab/subcommands/contrast.py,sha256=8uPCd5xI-aUsL7rjdEPmfSskdzMwM-1tv0eRRONkW
|
|
9
9
|
fotolab/subcommands/env.py,sha256=JamU3a2xWPbwlAj5iThHs58KYkLmjpUphZfTQODBp_4,1471
|
10
10
|
fotolab/subcommands/halftone.py,sha256=Xlbj3nVzqBXLzfemhF66nWV9U-PJHcG1Q2m2HiDhjI0,4322
|
11
11
|
fotolab/subcommands/info.py,sha256=DANbfBNy2SzFfeE4KqOViAZkaME6xujfZvJTHIaZyCY,3312
|
12
|
-
fotolab/subcommands/montage.py,sha256=
|
12
|
+
fotolab/subcommands/montage.py,sha256=TrMcYIeuzNHev-QGbBCA3htBfDjxPomtMXNtlKGBRmw,2145
|
13
13
|
fotolab/subcommands/resize.py,sha256=d2Nlslzlvri9L2rqmE-HbmnLozylSk3U1Hi3DF1q3Mc,5023
|
14
|
-
fotolab/subcommands/rotate.py,sha256=
|
14
|
+
fotolab/subcommands/rotate.py,sha256=wRWRG4PMLmw5kOi6NsLsNkh0Aw2WaBAdScWfBwGjDeM,2156
|
15
15
|
fotolab/subcommands/sharpen.py,sha256=xz8RW8cRPM4eUvJTO1Stsur3G67DBftVGza8kF5j2Pc,3700
|
16
16
|
fotolab/subcommands/watermark.py,sha256=a4GEVZG64B1giUigweXvDGS-Y7PeBXFyyrsHuko6ClQ,8124
|
17
|
-
fotolab-0.
|
18
|
-
fotolab-0.
|
19
|
-
fotolab-0.
|
20
|
-
fotolab-0.
|
21
|
-
fotolab-0.
|
17
|
+
fotolab-0.27.0.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
|
18
|
+
fotolab-0.27.0.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
|
19
|
+
fotolab-0.27.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
20
|
+
fotolab-0.27.0.dist-info/METADATA,sha256=MmQBQofr3eMnOji4Vx9jGooDml3k_5GCqS3ak3I0wto,11114
|
21
|
+
fotolab-0.27.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|