py-img-processor 1.2.2__tar.gz → 1.2.3__tar.gz
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.
Potentially problematic release.
This version of py-img-processor might be problematic. Click here for more details.
- {py_img_processor-1.2.2/py_img_processor.egg-info → py_img_processor-1.2.3}/PKG-INFO +1 -1
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/__init__.py +1 -1
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/merge.py +1 -1
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/processor.py +2 -3
- {py_img_processor-1.2.2 → py_img_processor-1.2.3/py_img_processor.egg-info}/PKG-INFO +1 -1
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/LICENSE +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/MANIFEST.in +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/README.md +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/enums.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/exceptions.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/main.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/__init__.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/alpha.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/base.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/blur.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/circle.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/crop.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/gray.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/resize.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/rotate.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/watermark.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/utils.py +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/SOURCES.txt +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/dependency_links.txt +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/entry_points.txt +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/not-zip-safe +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/requires.txt +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/top_level.txt +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/setup.cfg +0 -0
- {py_img_processor-1.2.2 → py_img_processor-1.2.3}/setup.py +0 -0
|
@@ -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,
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|