valetudo-map-parser 0.1.10b9__py3-none-any.whl → 0.1.10rc1__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.
@@ -556,8 +556,12 @@ class BaseHandler:
556
556
 
557
557
  async def async_resize_image(params: ResizeParams):
558
558
  """Resize the image to the given dimensions and aspect ratio."""
559
- if params.aspect_ratio:
560
- wsf, hsf = [int(x) for x in params.aspect_ratio.split(",")]
559
+
560
+ if params.aspect_ratio == "None":
561
+ return params.pil_img
562
+ if params.aspect_ratio != "None":
563
+ wsf, hsf = [int(x) for x in params.aspect_ratio.split(":")]
564
+
561
565
 
562
566
  if wsf == 0 or hsf == 0 or params.width <= 0 or params.height <= 0:
563
567
  LOGGER.warning(
@@ -586,15 +590,15 @@ async def async_resize_image(params: ResizeParams):
586
590
 
587
591
  return ImageOps.pad(params.pil_img, (new_width, new_height))
588
592
 
589
- return ImageOps.pad(params.pil_img, (params.width, params.height))
593
+ return params.pil_img
590
594
 
591
595
 
592
596
  def prepare_resize_params(handler, pil_img, rand):
593
597
  """Prepare resize parameters for image resizing."""
594
598
  return ResizeParams(
595
599
  pil_img=pil_img,
596
- width=handler.shared.image_ref_width,
597
- height=handler.shared.image_ref_height,
600
+ width=pil_img.width,
601
+ height=pil_img.height,
598
602
  aspect_ratio=handler.shared.image_aspect_ratio,
599
603
  crop_size=handler.crop_img_size,
600
604
  offset_func=handler.async_map_coordinates_offset,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: valetudo-map-parser
3
- Version: 0.1.10b9
3
+ Version: 0.1.10rc1
4
4
  Summary: A Python library to parse Valetudo map data returning a PIL Image object.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Classifier: Programming Language :: Python :: 3.14
15
15
  Requires-Dist: Pillow (>=10.3.0)
16
- Requires-Dist: mvcrender (==0.0.2)
16
+ Requires-Dist: mvcrender (>=0.0.2)
17
17
  Requires-Dist: numpy (>=1.26.4)
18
18
  Requires-Dist: scipy (>=1.12.0)
19
19
  Project-URL: Bug Tracker, https://github.com/sca075/Python-package-valetudo-map-parser/issues
@@ -20,7 +20,7 @@ valetudo_map_parser/config/shared.py,sha256=Sm5oWH0rmRMs0dBbGl5t7AxYyGvxKqEAR2Ra
20
20
  valetudo_map_parser/config/status_text/status_text.py,sha256=PaynYW11vXH_vhDxhZrR9j-xeDrCxbB6YQQtN-kcaxQ,4052
21
21
  valetudo_map_parser/config/status_text/translations.py,sha256=mmPbJkl_2A59w49wnesQf3ocXqwZxBsrqNX-yt5FSCQ,9132
22
22
  valetudo_map_parser/config/types.py,sha256=lxk9NE3qcgVins6MdOXmIz0fKlO3TIeHWtP--34Srtg,17303
23
- valetudo_map_parser/config/utils.py,sha256=ZMKB1Nh6RhDlWU_U5WC-9D0XXkh4n7K5OsZBMVU2OFE,34520
23
+ valetudo_map_parser/config/utils.py,sha256=-IZxogfWd7AjrtqVcHmC2nKmJnlGhkns42tuVAthHwg,34521
24
24
  valetudo_map_parser/hypfer_draw.py,sha256=jui31k0hh7G0z2OV7pvpes4uXH6x-BHjJW83icdBlF4,25313
25
25
  valetudo_map_parser/hypfer_handler.py,sha256=Q51Uqi9lCvS8dP30VsEi_Enz8eZabA3C9V1-3h1QhVM,23079
26
26
  valetudo_map_parser/hypfer_rooms_handler.py,sha256=NkpOA6Gdq-2D3lLAxvtNuuWMvPXHxeMY2TO5RZLSHlU,22652
@@ -29,8 +29,8 @@ valetudo_map_parser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
29
29
  valetudo_map_parser/rand256_handler.py,sha256=6zea23fBc_5qfo1Vbt4MzuMS5ChE5IwDrWwzOqpSqH0,25249
30
30
  valetudo_map_parser/reimg_draw.py,sha256=a93UPwcVl5y9mXMY5DsNWD4_pXzm1QhC_n_WOokhEAE,12534
31
31
  valetudo_map_parser/rooms_handler.py,sha256=tE8BrXcdL0SeFAYsdFvjR3NVDfDi2RPKnXw9jD1e5k8,17494
32
- valetudo_map_parser-0.1.10b9.dist-info/METADATA,sha256=CEOH0cpWSpA8mnPja0IsZhtxfta5R9Se0Mo9MGrl26Q,3403
33
- valetudo_map_parser-0.1.10b9.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
34
- valetudo_map_parser-0.1.10b9.dist-info/licenses/LICENSE,sha256=Lh-qBbuRV0-jiCIBhfV7NgdwFxQFOXH3BKOzK865hRs,10480
35
- valetudo_map_parser-0.1.10b9.dist-info/licenses/NOTICE.txt,sha256=5lTOuWiU9aiEnJ2go8sc7lTJ7ntMBx0g0GFnNrswCY4,2533
36
- valetudo_map_parser-0.1.10b9.dist-info/RECORD,,
32
+ valetudo_map_parser-0.1.10rc1.dist-info/METADATA,sha256=BE3uuwtwv_TfsYXm1V8dqjr4cmN3IHvjLibn9OgRQFg,3404
33
+ valetudo_map_parser-0.1.10rc1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
34
+ valetudo_map_parser-0.1.10rc1.dist-info/licenses/LICENSE,sha256=Lh-qBbuRV0-jiCIBhfV7NgdwFxQFOXH3BKOzK865hRs,10480
35
+ valetudo_map_parser-0.1.10rc1.dist-info/licenses/NOTICE.txt,sha256=5lTOuWiU9aiEnJ2go8sc7lTJ7ntMBx0g0GFnNrswCY4,2533
36
+ valetudo_map_parser-0.1.10rc1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.0
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any