valetudo-map-parser 0.1.10b8__tar.gz → 0.1.10rc1__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.
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/PKG-INFO +3 -3
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/utils.py +9 -5
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/hypfer_handler.py +3 -3
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/rand256_handler.py +3 -3
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/pyproject.toml +3 -2
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/LICENSE +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/NOTICE.txt +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/README.md +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/__init__.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/__init__.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/async_utils.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/auto_crop.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/color_utils.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/colors.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/drawable.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/drawable_elements.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/enhanced_drawable.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/FiraSans.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/Inter-VF.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/Lato-Regular.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/MPLUSRegular.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/NotoKufiArabic-VF.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/NotoSansCJKhk-VF.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/fonts/NotoSansKhojki.ttf +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/optimized_element_map.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/rand256_parser.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/shared.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/status_text/status_text.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/status_text/translations.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/config/types.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/hypfer_draw.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/hypfer_rooms_handler.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/map_data.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/py.typed +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/reimg_draw.py +0 -0
- {valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/rooms_handler.py +0 -0
@@ -1,19 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: valetudo-map-parser
|
3
|
-
Version: 0.1.
|
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
|
7
7
|
License-File: NOTICE.txt
|
8
8
|
Author: Sandro Cantarella
|
9
9
|
Author-email: gsca075@gmail.com
|
10
|
-
Requires-Python: >=3.
|
10
|
+
Requires-Python: >=3.13
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
14
13
|
Classifier: Programming Language :: Python :: 3.13
|
15
14
|
Classifier: Programming Language :: Python :: 3.14
|
16
15
|
Requires-Dist: Pillow (>=10.3.0)
|
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
|
@@ -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
|
-
|
560
|
-
|
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
|
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=
|
597
|
-
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,
|
@@ -14,8 +14,8 @@ from PIL import Image
|
|
14
14
|
|
15
15
|
from .config.async_utils import AsyncNumPy, AsyncPIL
|
16
16
|
|
17
|
-
from .config.auto_crop import AutoCrop
|
18
|
-
|
17
|
+
# from .config.auto_crop import AutoCrop
|
18
|
+
from mvcrender.autocrop import AutoCrop
|
19
19
|
from .config.drawable_elements import DrawableElement
|
20
20
|
from .config.shared import CameraShared
|
21
21
|
from .config.utils import pil_to_webp_bytes
|
@@ -368,7 +368,7 @@ class HypferMapImageHandler(BaseHandler, AutoCrop):
|
|
368
368
|
self.zooming = self.imd.img_h.zooming
|
369
369
|
|
370
370
|
# Resize the image
|
371
|
-
img_np_array =
|
371
|
+
img_np_array = self.async_auto_trim_and_zoom_image(
|
372
372
|
img_np_array,
|
373
373
|
colors["background"],
|
374
374
|
int(self.shared.margins),
|
@@ -15,8 +15,8 @@ import numpy as np
|
|
15
15
|
|
16
16
|
from .config.async_utils import AsyncNumPy, AsyncPIL
|
17
17
|
|
18
|
-
from .config.auto_crop import AutoCrop
|
19
|
-
|
18
|
+
# from .config.auto_crop import AutoCrop
|
19
|
+
from mvcrender.autocrop import AutoCrop
|
20
20
|
from .config.drawable_elements import DrawableElement
|
21
21
|
from .config.types import (
|
22
22
|
COLORS,
|
@@ -362,7 +362,7 @@ class ReImageHandler(BaseHandler, AutoCrop):
|
|
362
362
|
else:
|
363
363
|
self.zooming = False
|
364
364
|
|
365
|
-
img_np_array =
|
365
|
+
img_np_array = self.async_auto_trim_and_zoom_image(
|
366
366
|
img_np_array,
|
367
367
|
detect_colour=colors["background"],
|
368
368
|
margin_size=int(self.shared.margins),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "valetudo-map-parser"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.10rc1"
|
4
4
|
description = "A Python library to parse Valetudo map data returning a PIL Image object."
|
5
5
|
authors = ["Sandro Cantarella <gsca075@gmail.com>"]
|
6
6
|
license = "Apache-2.0"
|
@@ -14,10 +14,11 @@ packages = [{include = "valetudo_map_parser", from = "SCR"}]
|
|
14
14
|
"Changelog" = "https://github.com/sca075/Python-package-valetudo-map-parser/releases"
|
15
15
|
|
16
16
|
[tool.poetry.dependencies]
|
17
|
-
python = ">=3.
|
17
|
+
python = ">=3.13"
|
18
18
|
numpy = ">=1.26.4"
|
19
19
|
Pillow = ">=10.3.0"
|
20
20
|
scipy = ">=1.12.0"
|
21
|
+
mvcrender = ">=0.0.2"
|
21
22
|
|
22
23
|
[tool.poetry.group.dev.dependencies]
|
23
24
|
ruff = "*"
|
File without changes
|
File without changes
|
File without changes
|
{valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/__init__.py
RENAMED
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/map_data.py
RENAMED
File without changes
|
{valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/py.typed
RENAMED
File without changes
|
{valetudo_map_parser-0.1.10b8 → valetudo_map_parser-0.1.10rc1}/SCR/valetudo_map_parser/reimg_draw.py
RENAMED
File without changes
|
File without changes
|