valetudo-map-parser 0.1.9b27__py3-none-any.whl → 0.1.9b28__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.
@@ -29,7 +29,8 @@ class AutoCrop:
29
29
  self.imh = image_handler
30
30
  self.file_name = self.imh.file_name
31
31
 
32
- def validate_crop_dimensions(self, shared):
32
+ @staticmethod
33
+ def validate_crop_dimensions(shared):
33
34
  """Ensure width and height are valid before processing cropping."""
34
35
  if shared.image_ref_width <= 0 or shared.image_ref_height <= 0:
35
36
  _LOGGER.warning("Auto-crop failed: Invalid dimensions (width=%s, height=%s). Using original image.",
@@ -209,10 +210,7 @@ class AutoCrop:
209
210
  Automatically crops and trims a numpy array and returns the processed image.
210
211
  """
211
212
  try:
212
- if self.validate_crop_dimensions(self.imh.shared):
213
- await self._init_auto_crop()
214
- else:
215
- return image_array
213
+ await self._init_auto_crop()
216
214
  if self.imh.auto_crop is None:
217
215
  _LOGGER.debug("%s: Calculating auto trim box", self.file_name)
218
216
  # Find the coordinates of the first occurrence of a non-background color
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: valetudo-map-parser
3
- Version: 0.1.9b27
3
+ Version: 0.1.9b28
4
4
  Summary: A Python library to parse Valetudo map data returning a PIL Image object.
5
5
  License: Apache-2.0
6
6
  Author: Sandro Cantarella
@@ -1,7 +1,8 @@
1
1
  valetudo_map_parser/__init__.py,sha256=Wmd20bdI1btzMq-0x8NxGYWskTjdUmD-Fem9MTfziwU,810
2
2
  valetudo_map_parser/config/__init__.py,sha256=DQ9plV3ZF_K25Dp5ZQHPDoG-40dQoJNdNi-dfNeR3Zc,48
3
- valetudo_map_parser/config/auto_crop.py,sha256=J_1f4W_V1_kbALkWNd2VJosnjjSk5YR3IvHtDGmVGx0,10894
3
+ valetudo_map_parser/config/auto_crop.py,sha256=cTeLB2PpxDLRtX_Gp8oaqMIhi_SSSC048iCLGzMnoJo,10786
4
4
  valetudo_map_parser/config/colors.py,sha256=IzTT9JvF12YGGJxaTiEJRuwUdCCsFCLzsR9seCDfYWs,6515
5
+ valetudo_map_parser/config/colors_man.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
6
  valetudo_map_parser/config/drawable.py,sha256=hsrEJCMVOrjs5sJfr26SeqJD0VNlYWwxcVkkHeaxx7U,20356
6
7
  valetudo_map_parser/config/rand25_parser.py,sha256=kIayyqVZBfQfAMkiArzqrrj9vqZB3pkgT0Y5ufrQmGA,16448
7
8
  valetudo_map_parser/config/shared.py,sha256=jk7x8xCiE0UnE1oXcZ4iIBGz1Mv0CTHQOeZN2K94eXA,9743
@@ -13,8 +14,8 @@ valetudo_map_parser/map_data.py,sha256=6FbQfgxFB6E4kcOWokReJOVSekVaE1kStyhTQhAhi
13
14
  valetudo_map_parser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
15
  valetudo_map_parser/rand25_handler.py,sha256=nFOX1yVvZrAYxfY-aij7oIz0nKcUUL28y9_gsNJWWLw,15746
15
16
  valetudo_map_parser/reimg_draw.py,sha256=V0JUASavKVnEtAhv7nOV4pjsRxZrNsjIUtctbKO8wvk,12507
16
- valetudo_map_parser-0.1.9b27.dist-info/LICENSE,sha256=Lh-qBbuRV0-jiCIBhfV7NgdwFxQFOXH3BKOzK865hRs,10480
17
- valetudo_map_parser-0.1.9b27.dist-info/METADATA,sha256=SzlOLmV3VGgFRnaCjyyqrt2Cn7CIMin6rGGuwt9huyA,1029
18
- valetudo_map_parser-0.1.9b27.dist-info/NOTICE.txt,sha256=5lTOuWiU9aiEnJ2go8sc7lTJ7ntMBx0g0GFnNrswCY4,2533
19
- valetudo_map_parser-0.1.9b27.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
20
- valetudo_map_parser-0.1.9b27.dist-info/RECORD,,
17
+ valetudo_map_parser-0.1.9b28.dist-info/LICENSE,sha256=Lh-qBbuRV0-jiCIBhfV7NgdwFxQFOXH3BKOzK865hRs,10480
18
+ valetudo_map_parser-0.1.9b28.dist-info/METADATA,sha256=EKo4euQFhHrQ56ffEAzmGpmY8IkW9GlIIBWxwHTtoKg,1029
19
+ valetudo_map_parser-0.1.9b28.dist-info/NOTICE.txt,sha256=5lTOuWiU9aiEnJ2go8sc7lTJ7ntMBx0g0GFnNrswCY4,2533
20
+ valetudo_map_parser-0.1.9b28.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
21
+ valetudo_map_parser-0.1.9b28.dist-info/RECORD,,