Cursor Project Practice-02-Image Processing Tool imgtools
Project Description
A Cursor practice project - Python-based image processing tool supporting core functionalities including image compression, watermark addition, smart cropping, format conversion, and GIF creation. Features an intuitive drag-and-drop interface with batch processing capability for large quantities of image files. Includes one-click processing that executes watermarking and compression operations in user-defined parameter sequence, automatically saving outputs to specified directories with rule-based naming.
Particularly suitable for rapid processing of tutorial images. Allows quick customization and arrangement of required functions.
Results Demonstration



Prerequisites
-
Cursor
- Version: 1.2.1
- Cursor rules: Cursor Rules
- Agent: claude-4-sonnet-thinking
-
Workflow
- Set cursor rules → Describe requirements → Cursor coding → Git version control → Debug output
Issue Log
- How to adjust image size in markdown format
- Use markdown syntax with img tag and width attribute, e.g.:
<img src="./img/1.工具首页_cursor-02.png" alt="Tool Homepage_cursor-02" width="300" />
- When processing watermarked and compressed files into GIFs, the file size unexpectedly increases. Large files processed directly don't exhibit this issue and get compressed normally.
- Pending resolution.
Usage Insights
- When using Python, rules must specify virtual environment setup first. Operate within the virtual environment to prevent conflicts.
Project Detailed Steps
- Organize requirements by creating a document pj-requirement.md
# Image Processing Tool
## Requirements Description
* Image processing tool for operations including cropping, format conversion, compression, and watermarking.
* GIF generation from multiple images with configurable frame rate and loop count.
* GUI supporting image drag-and-drop and folder selection with batch processing capability.

-
Initiate processing with cursor based on requirements. Generate date, establish project directory, and set up environment.
-
Develop specific modules using cursor for coding and debugging.
-
Implement version control using Git.
-
Conduct verification testing on results.