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.

Files changed (30) hide show
  1. {py_img_processor-1.2.2/py_img_processor.egg-info → py_img_processor-1.2.3}/PKG-INFO +1 -1
  2. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/__init__.py +1 -1
  3. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/merge.py +1 -1
  4. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/processor.py +2 -3
  5. {py_img_processor-1.2.2 → py_img_processor-1.2.3/py_img_processor.egg-info}/PKG-INFO +1 -1
  6. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/LICENSE +0 -0
  7. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/MANIFEST.in +0 -0
  8. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/README.md +0 -0
  9. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/enums.py +0 -0
  10. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/exceptions.py +0 -0
  11. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/main.py +0 -0
  12. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/__init__.py +0 -0
  13. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/alpha.py +0 -0
  14. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/base.py +0 -0
  15. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/blur.py +0 -0
  16. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/circle.py +0 -0
  17. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/crop.py +0 -0
  18. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/gray.py +0 -0
  19. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/resize.py +0 -0
  20. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/rotate.py +0 -0
  21. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/parsers/watermark.py +0 -0
  22. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/imgprocessor/utils.py +0 -0
  23. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/SOURCES.txt +0 -0
  24. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/dependency_links.txt +0 -0
  25. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/entry_points.txt +0 -0
  26. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/not-zip-safe +0 -0
  27. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/requires.txt +0 -0
  28. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/py_img_processor.egg-info/top_level.txt +0 -0
  29. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/setup.cfg +0 -0
  30. {py_img_processor-1.2.2 → py_img_processor-1.2.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-img-processor
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: Image editor using Python and Pillow.
5
5
  Home-page: https://github.com/SkylerHu/py-img-processor.git
6
6
  Author: SkylerHu
@@ -5,7 +5,7 @@ import importlib
5
5
 
6
6
 
7
7
  __all__ = ["settings", "VERSION"]
8
- __version__ = "1.2.2"
8
+ __version__ = "1.2.3"
9
9
 
10
10
 
11
11
  VERSION = __version__
@@ -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.values:
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-img-processor
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: Image editor using Python and Pillow.
5
5
  Home-page: https://github.com/SkylerHu/py-img-processor.git
6
6
  Author: SkylerHu