fotolab 0.28.2__py3-none-any.whl → 0.28.3__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 +3 -3
- fotolab/subcommands/border.py +7 -11
- fotolab/subcommands/contrast.py +6 -11
- {fotolab-0.28.2.dist-info → fotolab-0.28.3.dist-info}/METADATA +1 -1
- {fotolab-0.28.2.dist-info → fotolab-0.28.3.dist-info}/RECORD +8 -8
- {fotolab-0.28.2.dist-info → fotolab-0.28.3.dist-info}/LICENSE.md +0 -0
- {fotolab-0.28.2.dist-info → fotolab-0.28.3.dist-info}/WHEEL +0 -0
- {fotolab-0.28.2.dist-info → fotolab-0.28.3.dist-info}/entry_points.txt +0 -0
fotolab/__init__.py
CHANGED
@@ -23,7 +23,7 @@ from pathlib import Path
|
|
23
23
|
|
24
24
|
from PIL import Image
|
25
25
|
|
26
|
-
__version__ = "0.28.
|
26
|
+
__version__ = "0.28.3"
|
27
27
|
|
28
28
|
log = logging.getLogger(__name__)
|
29
29
|
|
@@ -102,5 +102,5 @@ def _open_image(filename):
|
|
102
102
|
subprocess.Popen(["open", filename])
|
103
103
|
log.info("open image: %s", filename.resolve())
|
104
104
|
|
105
|
-
except OSError as
|
106
|
-
log.error("Error opening image: %s -> %s", filename,
|
105
|
+
except OSError as error:
|
106
|
+
log.error("Error opening image: %s -> %s", filename, error)
|
fotolab/subcommands/border.py
CHANGED
@@ -137,17 +137,13 @@ def run(args: argparse.Namespace) -> None:
|
|
137
137
|
log.debug(args)
|
138
138
|
|
139
139
|
for image_filename in args.image_filenames:
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
)
|
148
|
-
except Exception as e:
|
149
|
-
log.error("Error adding border to %s: %s", image_filename, e)
|
150
|
-
continue
|
140
|
+
original_image = Image.open(image_filename)
|
141
|
+
border = get_border(args)
|
142
|
+
bordered_image = ImageOps.expand(
|
143
|
+
original_image,
|
144
|
+
border=border,
|
145
|
+
fill=ImageColor.getrgb(args.color),
|
146
|
+
)
|
151
147
|
|
152
148
|
save_image(args, bordered_image, image_filename, "border")
|
153
149
|
|
fotolab/subcommands/contrast.py
CHANGED
@@ -86,14 +86,9 @@ def run(args: argparse.Namespace) -> None:
|
|
86
86
|
log.debug(args)
|
87
87
|
|
88
88
|
for image_filename in args.image_filenames:
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
save_image(args, contrast_image, image_filename, "contrast")
|
96
|
-
except FileNotFoundError:
|
97
|
-
log.error(f"Image file not found: {image_filename}")
|
98
|
-
except IOError:
|
99
|
-
log.error(f"Cannot open or read image file: {image_filename}")
|
89
|
+
original_image = Image.open(image_filename)
|
90
|
+
contrast_image = ImageOps.autocontrast(
|
91
|
+
original_image, cutoff=args.cutoff
|
92
|
+
)
|
93
|
+
|
94
|
+
save_image(args, contrast_image, image_filename, "contrast")
|
@@ -1,11 +1,11 @@
|
|
1
|
-
fotolab/__init__.py,sha256=
|
1
|
+
fotolab/__init__.py,sha256=35eixAnDTMMD_Lo53GtOrbQP3TssQ5Ywex79dO-QwmU,3247
|
2
2
|
fotolab/__main__.py,sha256=aboOURPs_snOXTEWYR0q8oq1UTY9e-NxCd1j33V0wHI,833
|
3
3
|
fotolab/cli.py,sha256=fIApD9C4Vkn-u4CejOFTboSV5f-Ks9vBGxeb-_ca-Nw,3935
|
4
4
|
fotolab/subcommands/__init__.py,sha256=l3DlIaJ3u3jGjnC1H1yV8LZ_nPqOLJ6gikD4BCaMAQ0,1129
|
5
5
|
fotolab/subcommands/animate.py,sha256=OcS6Q6JM1TW6HF0dSgBsV9mpEGwDMcJlQssupkf0_ZA,3393
|
6
6
|
fotolab/subcommands/auto.py,sha256=ia-xegV1Z4HvYsbKgmTzf1NfNFdTDPWfZe7vQ1_90Ik,2425
|
7
|
-
fotolab/subcommands/border.py,sha256=
|
8
|
-
fotolab/subcommands/contrast.py,sha256=
|
7
|
+
fotolab/subcommands/border.py,sha256=BS3BHytdWiNumxdKulKYK-WigbsKtPxECdvInUhUjSQ,4608
|
8
|
+
fotolab/subcommands/contrast.py,sha256=Z_YoCqtc3s5jhFq-30-46Nu_1P5o_8xDYRh5BDybK0g,2523
|
9
9
|
fotolab/subcommands/env.py,sha256=QoxRvzZKgmoHTUxDV4QYhdChCpMWs5TbXFY_qIpIQpE,1469
|
10
10
|
fotolab/subcommands/halftone.py,sha256=bRGG_Bg1T5ZV3UWsdMszOdPmc6g9_R0yNp5mb0g8hcE,4152
|
11
11
|
fotolab/subcommands/info.py,sha256=Qp-Zu7Xp1ptLK211hOkFM5oxZWGTrlNBqCpbx2IjL9Y,3371
|
@@ -14,8 +14,8 @@ fotolab/subcommands/resize.py,sha256=UOb2rg_5ArRj0gxPTDOww_ix3tqJRC0W5b_S-Lt1G4w
|
|
14
14
|
fotolab/subcommands/rotate.py,sha256=uBFjHyjiBSQLtrtH1p9myODIHUDr1gkL4PpU-6Y1Ofo,2575
|
15
15
|
fotolab/subcommands/sharpen.py,sha256=YNho2IPbc-lPvSy3Bsjehc2JOEy27LPqFSGRULs9MyY,3492
|
16
16
|
fotolab/subcommands/watermark.py,sha256=A_dUy_yf9wPHUexB9aIicFIS-BpWrjjfI8Hr4WCCBoc,9449
|
17
|
-
fotolab-0.28.
|
18
|
-
fotolab-0.28.
|
19
|
-
fotolab-0.28.
|
20
|
-
fotolab-0.28.
|
21
|
-
fotolab-0.28.
|
17
|
+
fotolab-0.28.3.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
|
18
|
+
fotolab-0.28.3.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
|
19
|
+
fotolab-0.28.3.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
20
|
+
fotolab-0.28.3.dist-info/METADATA,sha256=7aeKGIpjyjro2H-uHBnKIDd10eJ8rcqGLQUcAeVSDSo,12896
|
21
|
+
fotolab-0.28.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|