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

Tool Homepage_cursor-02 Tool Homepage_cursor-02 Tool Homepage_cursor-02

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

  1. 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" />
    
  2. 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

  1. When using Python, rules must specify virtual environment setup first. Operate within the virtual environment to prevent conflicts.

Project Detailed Steps

  1. 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.
pj-requirement
  1. Initiate processing with cursor based on requirements. Generate date, establish project directory, and set up environment.

    pj-docs
  2. Develop specific modules using cursor for coding and debugging.

  3. Implement version control using Git.

  4. Conduct verification testing on results.