技能详情(站内镜像,无评论)
作者:AIpoch @AIPOCH-AI
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v0.1.0
统计:⭐ 0 · 26 · 0 current installs · 0 all-time installs
⭐ 0
安装量(当前) 0
🛡 VirusTotal :良性 · OpenClaw :可疑
Package:aipoch-ai/dpi-upscaler-checker
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :可疑
OpenClaw 评估
The skill's code and instructions mostly match its stated purpose (DPI checking and local upscaling), but there are a few inconsistencies and missing safeguards (EXIF preservation claim, path-sanitization, sloppy requirements) and the main script is truncated so the full behavior isn't visible.
目的
Name/description align with included code: DPIChecker and ImageUpscaler implement DPI measurement and local upscaling using PIL/OpenCV/Real-ESRGAN. No unrelated credentials, binaries, or services are requested.
说明范围
SKILL.md instructs running scripts/main.py for check/upscale which reads input files and writes output files—expected for this tool. However, SKILL.md claims 'preserves original EXIF information' but the shown save() call does not pass EXIF data back into the output image (no exif=... passed), so that claim is inconsistent with code. The checklist mentions path traversal protection, but the code does not show explicit input path sanitization; …
安装机制
There is no install specification (instruction-only), which is lower risk. A requirements.txt is included but not automatically applied; it contains duplicate/incorrect entries (e.g., both 'pil' and 'pillow', 'cv2' and 'opencv-python'), which is sloppy but not directly malicious. The code references model files (e.g., EDSR_x{scale}.pb) and Real-ESRGAN but offers no automated download—user must supply models.
证书
The skill requires no environment variables, no credentials, and no special system-wide config. Requested access (filesystem read/write of provided paths) is proportionate to its stated functionality.
持久
always is false, the skill does not request persistent agent privileges, and there's no evidence it modifies other skills or global agent settings in the visible code.
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Dpi Upscaler Checker」。简介:Check image DPI and intelligently upscale low-resolution images using super-res…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aipoch-ai/dpi-upscaler-checker/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: dpi-upscaler-checker
description: Check image DPI and intelligently upscale low-resolution images using
super-resolution
version: 1.0.0
category: Visual
tags:
- dpi
- upscaling
- super-resolution
- image-quality
- 300dpi
author: AIPOCH
license: MIT
status: Draft
risk_level: Medium
skill_type: Tool/Script
owner: AIPOCH
reviewer: ''
last_updated: '2026-02-06'
---
# DPI Upscaler & Checker
Check if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology.
## Features
- **DPI Detection**: Read and verify image DPI information
- **Intelligent Analysis**: Calculate actual print size and pixel density
- **Super-Resolution Restoration**: Use Real-ESRGAN algorithm to enhance image clarity
- **Batch Processing**: Support single image and batch folder processing
- **Format Support**: JPG, PNG, TIFF, BMP, WebP
## Use Cases
- Academic paper figure DPI checking
- Print image quality pre-inspection
- Low-resolution material restoration
- Document scan enhancement
## Usage
### Check Single Image DPI
```bash
python scripts/main.py check --input image.jpg
```
### Batch Check Folder
```bash
python scripts/main.py check --input ./images/ --output report.json
```
### Super-Resolution Restoration
```bash
python scripts/main.py upscale --input image.jpg --output upscaled.jpg --scale 4
```
### Batch Fix Low DPI Images
```bash
python scripts/main.py upscale --input ./images/ --output ./output/ --min-dpi 300 --scale 2
```
## Parameters
### Check Command
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `--input` | string | - | Yes | Input image path or folder |
| `--output` | string | stdout | No | Output report path |
| `--target-dpi` | int | 300 | No | Target DPI threshold |
### Upscale Command
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `--input` | string | - | Yes | Input image path or folder |
| `--output` | string | - | Yes | Output path |
| `--scale` | int | 2 | No | Scale factor (2/3/4) |
| `--min-dpi` | int | - | No | Only process images below this DPI |
| `--denoise` | int | 0 | No | Denoise level (0-3) |
| `--face-enhance` | flag | false | No | Enable face enhancement |
## Output Description
### DPI Check Report
```json
{
"file": "image.jpg",
"dpi": [72, 72],
"width_px": 1920,
"height_px": 1080,
"print_width_cm": 67.7,
"print_height_cm": 38.1,
"meets_300dpi": false,
"recommended_scale": 4.17
}
```
### Restored Image
- Automatically saved as `<original_filename>_upscaled.<extension>`
- Preserves original EXIF information
- Sets DPI to 300
## Dependencies
- Python >= 3.8
- Pillow >= 9.0.0
- opencv-python >= 4.5.0
- numpy >= 1.21.0
- realesrgan (optional, for best results)
## Algorithm Description
### DPI Calculation
```
Actual DPI = Pixel dimensions / Physical dimensions
Print size (cm) = Pixel count / DPI * 2.54
```
### Super-Resolution
- Default use of Real-ESRGAN model
- Support lightweight bicubic interpolation fallback
- Intelligent model selection (general/anime/face)
## Notes
1. Input image DPI information may be inaccurate; actual pixel calculation shall prevail
2. Super-resolution cannot create non-existent information; extremely blurry images have limited improvement
3. Large file processing requires more memory
4. GPU acceleration requires CUDA environment (optional)
## Risk Assessment
| Risk Indicator | Assessment | Level |
|----------------|------------|-------|
| Code Execution | Python/R scripts executed locally | Medium |
| Network Access | No external API calls | Low |
| File System Access | Read input files, write output files | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Output files saved to workspace | Low |
## Security Checklist
- [ ] No hardcoded credentials or API keys
- [ ] No unauthorized file system access (../)
- [ ] Output does not expose sensitive information
- [ ] Prompt injection protections in place
- [ ] Input file paths validated (no ../ traversal)
- [ ] Output directory restricted to workspace
- [ ] Script execution in sandboxed environment
- [ ] Error messages sanitized (no stack traces exposed)
- [ ] Dependencies audited
## Prerequisites
```bash
# Python dependencies
pip install -r requirements.txt
```
## Evaluation Criteria
### Success Metrics
- [ ] Successfully executes main functionality
- [ ] Output meets quality standards
- [ ] Handles edge cases gracefully
- [ ] Performance is acceptable
### Test Cases
1. **Basic Functionality**: Standard input → Expected output
2. **Edge Case**: Invalid input → Graceful error handling
3. **Performance**: Large dataset → Acceptable processing time
## Lifecycle Status
- **Current Stage**: Draft
- **Next Review Date**: 2026-03-06
- **Known Issues**: None
- **Planned Improvements**:
- Performance optimization
- Additional feature support