fotolab 0.28.2__py3-none-any.whl → 0.28.4__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 CHANGED
@@ -23,7 +23,7 @@ from pathlib import Path
23
23
 
24
24
  from PIL import Image
25
25
 
26
- __version__ = "0.28.2"
26
+ __version__ = "0.28.4"
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 e:
106
- log.error("Error opening image: %s -> %s", filename, e)
105
+ except OSError as error:
106
+ log.error("Error opening image: %s -> %s", filename, error)
@@ -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
- try:
141
- original_image = Image.open(image_filename)
142
- border = get_border(args)
143
- bordered_image = ImageOps.expand(
144
- original_image,
145
- border=border,
146
- fill=ImageColor.getrgb(args.color),
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
 
@@ -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
- try:
90
- original_image = Image.open(image_filename)
91
- contrast_image = ImageOps.autocontrast(
92
- original_image, cutoff=args.cutoff
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.28.2
3
+ Version: 0.28.4
4
4
  Summary: A console program that manipulate images.
5
5
  Keywords: photography,photo
6
6
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
@@ -165,15 +165,16 @@ positional arguments:
165
165
  options:
166
166
  -h, --help show this help message and exit
167
167
  -c, --color COLOR set the color of border (default: 'black')
168
- -w, --width WIDTH set the width of border (default: '10')
168
+ -w, --width WIDTH set the width of border in pixels (default: '10')
169
169
  -wt, --width-top WIDTH
170
- set the width of top border (default: '0')
170
+ set the width of top border in pixels (default: '0')
171
171
  -wr, --width-right WIDTH
172
- set the width of right border (default: '0')
172
+ set the width of right border in pixels (default: '0')
173
173
  -wb, --width-bottom WIDTH
174
- set the width of bottom border (default: '0')
174
+ set the width of bottom border in pixels (default:
175
+ '0')
175
176
  -wl, --width-left WIDTH
176
- set the width of left border (default: '0')
177
+ set the width of left border in pixels (default: '0')
177
178
  -op, --open open the image using default program (default:
178
179
  'False')
179
180
  -od, --output-dir OUTPUT_DIR
@@ -1,11 +1,11 @@
1
- fotolab/__init__.py,sha256=OHLey_plZNWMw-8lpxpw7YdsztO4PVD_NK5xhpmd-M4,3239
1
+ fotolab/__init__.py,sha256=d3KxiWUNNGM-vsXEsA5FdYXaoN7ESXwT3ouudOQnuqs,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=npL5dXTl6zpMnxPsMApgm6p9FS32WZy6sEy-_IuB5_4,4775
8
- fotolab/subcommands/contrast.py,sha256=fkY_Xd405eifObGoqR4AsLSNriNBpkFjDR_pZ1AMqcc,2754
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.2.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
18
- fotolab-0.28.2.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
19
- fotolab-0.28.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
20
- fotolab-0.28.2.dist-info/METADATA,sha256=GNIrGD_H3-wNlOIoxbv-dSUFpsSQnZVqUXo8fOVtwac,12896
21
- fotolab-0.28.2.dist-info/RECORD,,
17
+ fotolab-0.28.4.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
18
+ fotolab-0.28.4.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
19
+ fotolab-0.28.4.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
20
+ fotolab-0.28.4.dist-info/METADATA,sha256=ULzn7UgnCNGXWSJazCpRpRDSNK0HZhdAx8eAwgLqwYk,12970
21
+ fotolab-0.28.4.dist-info/RECORD,,