instavm/coderunner
Overview
This skill crops images to 50% of their original size from the image center and then rotates the result 90 degrees clockwise. It uses a compact Python script built on PIL/Pillow for reliable, high-quality processing. The output is a smaller, rotated image saved to a user-specified path for easy delivery.
How this skill works
The script opens the input image, computes a centered crop that is half the width and half the height of the original, and extracts that central region. It then rotates the cropped image 90 degrees clockwise and saves the final image to the provided output path. Supported input formats are any formats handled by PIL/Pillow (JPEG, PNG, GIF, BMP, TIFF, etc.).
When to use it
- When a user requests a centered crop that reduces image dimensions by half
- When a user wants a 90° clockwise rotation applied after cropping
- When combining center cropping and rotation in a single automated step
- When preparing images for thumbnails or vertical/horizontal layout adjustments
- When needing a quick local tool that avoids manual editing apps
Best practices
- Confirm input image resolution and aspect ratio before processing to ensure the centered 50% crop meets composition needs
- Run the script on a copy of the original to preserve the source file
- Verify final orientation and dimensions after rotation, since width and height swap for non-square crops
- Use lossless formats (PNG, TIFF) if multiple edits are expected to avoid cumulative JPEG artifacts
- Automate file movement: place uploads in the designated input directory and collect outputs from the designated output directory
Example use cases
- Create uniform thumbnails by center-cropping high-resolution photos and rotating for consistent orientation
- Prepare product images for a catalog where centered detail is required and orientation must be portrait
- Batch-process user-uploaded images before display on a website to enforce size and rotation rules
- Quickly generate rotated profile images from square or landscape photos by extracting the center and rotating
- Integrate into a preprocessing pipeline for an ML dataset that requires centered crops and consistent rotation
FAQ
The crop preserves the same aspect ratio as the original because it crops 50% of both width and height; rotation swaps width and height for non-square images.
What file types are supported?
Any format supported by PIL/Pillow is supported, including JPEG, PNG, GIF, BMP, and TIFF.
2 skills
This skill crops images to 50% from center and rotates them 90 degrees clockwise, enabling quick centered edits and orientation adjustments.
This skill updates text in fillable PDF forms by replacing specified field values, preserving form structure and enabling batch edits.