py-img-processor 1.2.2__py3-none-any.whl → 1.2.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.
- imgprocessor/__init__.py +1 -1
- imgprocessor/parsers/merge.py +1 -1
- imgprocessor/processor.py +2 -3
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/METADATA +1 -1
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/RECORD +9 -9
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/LICENSE +0 -0
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/WHEEL +0 -0
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/entry_points.txt +0 -0
- {py_img_processor-1.2.2.dist-info → py_img_processor-1.2.3.dist-info}/top_level.txt +0 -0
imgprocessor/__init__.py
CHANGED
imgprocessor/parsers/merge.py
CHANGED
|
@@ -90,7 +90,7 @@ class MergeParser(BaseParser):
|
|
|
90
90
|
raise ParamValidateException(f"merage操作中actions参数校验异常,其中 {e}")
|
|
91
91
|
|
|
92
92
|
def compute(self, src_w: int, src_h: int, w2: int, h2: int) -> tuple:
|
|
93
|
-
if self.order in enums.PositionOrder
|
|
93
|
+
if self.order in enums.PositionOrder:
|
|
94
94
|
order = typing.cast(int, self.order)
|
|
95
95
|
w, h, x1, y1, x2, y2 = compute_splice_two_im(
|
|
96
96
|
src_w,
|
imgprocessor/processor.py
CHANGED
|
@@ -51,13 +51,12 @@ class ProcessorCtr(object):
|
|
|
51
51
|
**kwargs: typing.Any,
|
|
52
52
|
) -> typing.Optional[typing.ByteString]:
|
|
53
53
|
fmt = kwargs.get("format") or im.format
|
|
54
|
-
kwargs["format"] = fmt
|
|
55
54
|
|
|
56
|
-
if fmt.upper() == enums.ImageFormat.JPEG.value and im.mode == "RGBA":
|
|
55
|
+
if fmt and fmt.upper() == enums.ImageFormat.JPEG.value and im.mode == "RGBA":
|
|
57
56
|
im = im.convert("RGB")
|
|
58
57
|
|
|
59
58
|
if not kwargs.get("quality"):
|
|
60
|
-
if fmt.upper() == enums.ImageFormat.JPEG.value and im.format == enums.ImageFormat.JPEG.value:
|
|
59
|
+
if fmt and fmt.upper() == enums.ImageFormat.JPEG.value and im.format == enums.ImageFormat.JPEG.value:
|
|
61
60
|
kwargs["quality"] = "keep"
|
|
62
61
|
else:
|
|
63
62
|
kwargs["quality"] = settings.PROCESSOR_DEFAULT_QUALITY
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
imgprocessor/__init__.py,sha256=
|
|
1
|
+
imgprocessor/__init__.py,sha256=MRxiDm197O7yKi84nRtUSDP1NvjN5FhzFgtJB8j4-fA,2485
|
|
2
2
|
imgprocessor/enums.py,sha256=uionzxbpytnM1iWPTj2Imh6v20kOhGy1i2HPsH-J14U,3129
|
|
3
3
|
imgprocessor/exceptions.py,sha256=kj9win_XjCbZnXr93sYs4Cfg1hAJX2fn5hgr1YMNoHQ,384
|
|
4
4
|
imgprocessor/main.py,sha256=WDRsVtHNqlsngZHVZHuY0IE93OsXC5XD1fL-Zbw0KDs,4117
|
|
5
|
-
imgprocessor/processor.py,sha256=
|
|
5
|
+
imgprocessor/processor.py,sha256=VEZfDSDtJb5F8XbaFli234GKt50D1JUDGzPGkzugqDM,4555
|
|
6
6
|
imgprocessor/utils.py,sha256=KBRQJaN8FuuRD2QQPYuuHQ7S-2ML-ctz4rstQTrEdog,1202
|
|
7
7
|
imgprocessor/parsers/__init__.py,sha256=J3KQGgqUerzcnXihIcy7l0Z5JF8UjlVLqVEDEigPS8I,2937
|
|
8
8
|
imgprocessor/parsers/alpha.py,sha256=PudXZBu-s5Fzj6fB7Aae4yxJkmdfd_l_oAFSk7279Zk,877
|
|
@@ -11,13 +11,13 @@ imgprocessor/parsers/blur.py,sha256=twVLORVV4nXfvHBaqi353X6odOnRi414sye3AOGG5bY,
|
|
|
11
11
|
imgprocessor/parsers/circle.py,sha256=VXWgKIkz9emQHWOoO2jbkUFrEbXb1s6ZM-R8BRxSi4c,1665
|
|
12
12
|
imgprocessor/parsers/crop.py,sha256=FfPPmN63XUQZCgRkKuuycj9SLdS-0hnLAU5mRrj-4Uc,3524
|
|
13
13
|
imgprocessor/parsers/gray.py,sha256=qMPid9X2tJko3pt5O-RNpXBR5drTowwOHTlfEFksiuQ,402
|
|
14
|
-
imgprocessor/parsers/merge.py,sha256=
|
|
14
|
+
imgprocessor/parsers/merge.py,sha256=4UIeWwDVg9rJRbTVRvNTyv-mxTA8W5TIgWAvWYXjvhA,5211
|
|
15
15
|
imgprocessor/parsers/resize.py,sha256=31iJws5YVsqJZN4O-HG9OjGBtKFW_mGE5536pYvWchU,5175
|
|
16
16
|
imgprocessor/parsers/rotate.py,sha256=Vb23OJuGQrdGRkJWpDJeeVkZUF9bbsRD2e58P5Q1b1k,734
|
|
17
17
|
imgprocessor/parsers/watermark.py,sha256=MTlRVvtVMR5IyJODk5DMFe01KQKGAulaaNy7f23NvME,8862
|
|
18
|
-
py_img_processor-1.2.
|
|
19
|
-
py_img_processor-1.2.
|
|
20
|
-
py_img_processor-1.2.
|
|
21
|
-
py_img_processor-1.2.
|
|
22
|
-
py_img_processor-1.2.
|
|
23
|
-
py_img_processor-1.2.
|
|
18
|
+
py_img_processor-1.2.3.dist-info/LICENSE,sha256=Sr4UxtHWGmoO_enyTUeAN276LkBqJpse0guCcb6f9BQ,1066
|
|
19
|
+
py_img_processor-1.2.3.dist-info/METADATA,sha256=DoivN4bYUzPjDEdt2cm_4vJAgMdMBZbG0_wRLyT7dhQ,7553
|
|
20
|
+
py_img_processor-1.2.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
21
|
+
py_img_processor-1.2.3.dist-info/entry_points.txt,sha256=MLeLjzpkH7DkDMgICWCQ99D9ElqAvTBVBGA8yjg4dhQ,57
|
|
22
|
+
py_img_processor-1.2.3.dist-info/top_level.txt,sha256=5Pm26oHcqZoihGGxc5N6qQJ2LuVa2i4au_uqHBMqehI,13
|
|
23
|
+
py_img_processor-1.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|