mobile-mcp-ai 2.3.0__tar.gz → 2.3.1__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.
- {mobile_mcp_ai-2.3.0/mobile_mcp_ai.egg-info → mobile_mcp_ai-2.3.1}/PKG-INFO +1 -1
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/basic_tools_lite.py +23 -2
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/ios_client_wda.py +1 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1/mobile_mcp_ai.egg-info}/PKG-INFO +1 -1
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/setup.py +1 -1
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/LICENSE +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/MANIFEST.in +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/README.md +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/__init__.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/config.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/__init__.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/device_manager.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/dynamic_config.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/ios_device_manager_wda.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/mobile_client.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/utils/__init__.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/utils/logger.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/utils/operation_history_manager.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/core/utils/smart_wait.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/docs/iOS_SETUP_GUIDE.md +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mcp_tools/__init__.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mcp_tools/mcp_server.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/SOURCES.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/dependency_links.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/entry_points.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/not-zip-safe +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/requires.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/mobile_mcp_ai.egg-info/top_level.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/requirements.txt +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/setup.cfg +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_mind_cloud_my_space.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_mind_correct.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_mind_improved.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_mind_optimized.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_open_mind.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_priority_demo.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_simple.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_/344/270/276/346/212/245.py" +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_/345/210/207/346/215/242/350/257/255/350/250/200/345/210/260English.py" +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/tests/test_/346/265/213/350/257/225.py" +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/utils/__init__.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/utils/logger.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/utils/xml_formatter.py +0 -0
- {mobile_mcp_ai-2.3.0 → mobile_mcp_ai-2.3.1}/utils/xml_parser.py +0 -0
|
@@ -113,7 +113,18 @@ class BasicMobileToolsLite:
|
|
|
113
113
|
ratio = max_width / img.width
|
|
114
114
|
new_w = max_width
|
|
115
115
|
new_h = int(img.height * ratio)
|
|
116
|
-
|
|
116
|
+
# 兼容不同版本的 Pillow
|
|
117
|
+
try:
|
|
118
|
+
# Pillow 10.0.0+
|
|
119
|
+
resample = Image.Resampling.LANCZOS
|
|
120
|
+
except AttributeError:
|
|
121
|
+
try:
|
|
122
|
+
# Pillow 9.x
|
|
123
|
+
resample = Image.LANCZOS
|
|
124
|
+
except AttributeError:
|
|
125
|
+
# Pillow 旧版本
|
|
126
|
+
resample = Image.ANTIALIAS
|
|
127
|
+
img = img.resize((new_w, new_h), resample)
|
|
117
128
|
|
|
118
129
|
# 第4步:生成最终文件名(JPEG 格式)
|
|
119
130
|
if description:
|
|
@@ -125,7 +136,17 @@ class BasicMobileToolsLite:
|
|
|
125
136
|
final_path = self.screenshot_dir / filename
|
|
126
137
|
|
|
127
138
|
# 第5步:保存为 JPEG(PNG 可能有透明通道,需转 RGB)
|
|
128
|
-
|
|
139
|
+
# 先转换为 RGB 模式,处理可能的 RGBA 或 P 模式
|
|
140
|
+
if img.mode in ('RGBA', 'LA', 'P'):
|
|
141
|
+
# 创建白色背景
|
|
142
|
+
background = Image.new('RGB', img.size, (255, 255, 255))
|
|
143
|
+
if img.mode == 'P':
|
|
144
|
+
img = img.convert('RGBA')
|
|
145
|
+
background.paste(img, mask=img.split()[-1] if img.mode == 'RGBA' else None)
|
|
146
|
+
img = background
|
|
147
|
+
elif img.mode != 'RGB':
|
|
148
|
+
img = img.convert("RGB")
|
|
149
|
+
|
|
129
150
|
img.save(str(final_path), "JPEG", quality=quality)
|
|
130
151
|
|
|
131
152
|
# 第6步:删除临时 PNG
|
|
@@ -25,7 +25,7 @@ if requirements_file.exists():
|
|
|
25
25
|
|
|
26
26
|
setup(
|
|
27
27
|
name="mobile-mcp-ai",
|
|
28
|
-
version="2.3.
|
|
28
|
+
version="2.3.1", # 修复截图压缩兼容性问题(Pillow 版本 + RGBA 处理)
|
|
29
29
|
author="douzi",
|
|
30
30
|
author_email="1492994674@qq.com",
|
|
31
31
|
description="移动端自动化 MCP Server - 支持 Android/iOS,AI 功能可选(基础工具不需要 AI)",
|
|
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
|
|
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
|