Check if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology.
55
63%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Other/dpi-upscaler-checker/SKILL.mdCheck if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology.
This skill accepts: image files (JPG, PNG, TIFF, BMP, WebP) or folder paths for DPI checking and/or AI super-resolution upscaling.
If the user's request does not involve image DPI checking or upscaling — for example, asking to analyze text documents, process audio files, or perform general data analysis — do not proceed with the workflow. Instead respond:
"dpi-upscaler-checker is designed to check image DPI standards and restore low-resolution images. Your request appears to be outside this scope. Please provide an image file path or folder, or use a more appropriate tool for your task."
Do not continue the workflow when the request is out of scope, missing a critical input (--input path), or would require unsupported assumptions. For missing inputs, state exactly which fields are missing.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --demo
python -c "import PIL; print('Pillow OK')"
python scripts/main.py check --input image.jpg --json--input path is provided before any processing.python scripts/main.py check --input image.jpg
python scripts/main.py check --input image.jpg --json # JSON to stdout for agent consumptionpython scripts/main.py check --input ./images/ --output report.jsonpython scripts/main.py upscale --input image.jpg --output upscaled.jpg --scale 4python scripts/main.py upscale --input ./images/ --output ./output/ --min-dpi 300 --scale 2python scripts/main.py --demo| 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 |
--json | flag | false | No | Output results as JSON to stdout |
| 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 |
{
"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
}<original_filename>_upscaled.<extension>print_size_cm = (pixel_count / dpi) * 2.54; recommended_scale = target_dpi / avg_dpi--output)except (AttributeError, KeyError, TypeError, ZeroDivisionError) — bare except replaced with specific exception typesquality=95; PNG: compress_level=6)Path.rglob; resolve paths with path.resolve() before processing to avoid unexpected directory traversal via symlinksIf scripts/main.py fails or required inputs are incomplete:
from PIL import Image; img = Image.open('file.jpg'); print(img.info.get('dpi')).scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.pip install -r requirements.txt63c61d3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.