AutoCropAI is a focused image-utility app inspired by GIMP's "Crop to Content" feature. Its purpose is simple: remove all empty space around an image so only the actual content remains.
Upload a PNG, JPG, or HEIC with a transparent or solid background and AutoCropAI automatically finds the largest area that contains real content, then crops away uniform borders with zero padding. The result is a clean, tightly-cropped PNG that preserves the original resolution and transparency.
- Simple (GIMP-like): Replicates the classic Crop-to-Content behavior by trimming fully transparent pixels or uniform edge colors.
- Advanced (Tolerance Control): Adds adjustable tolerance so you can fine-tune how strictly background colors are detected, useful for anti-aliasing or noisy edges.
- AI Mode (Local): Uses on-device segmentation to separate foreground from complex backgrounds such as gradients, textures, or shadows before cropping. (Unavailable in MVP - requires future ML implementation)
- No accounts, no uploads stored
- Preserves image quality and alpha transparency
- Designed as a modern, mobile-friendly evolution of GIMP's AutoCrop idea
- Ideal for designers, developers, and anyone tired of manual cropping
- Screens: TrimScreen, HistoryScreen, SettingsScreen, InfoModalScreen
- Navigation: Bottom tab navigator with 3 tabs (History, Crop, Settings)
- State Management: React hooks + AsyncStorage for persistence
- Image Processing: Images sent to backend for processing via REST API
- Port: 5000
- Image Processing: Uses Sharp library for pixel-level image analysis and cropping
- Endpoints:
POST /api/trim- Crops image based on settingsPOST /api/image-info- Gets image metadataGET /api/health- Health check
client/screens/TrimScreen.tsx- Main cropping interfaceclient/screens/HistoryScreen.tsx- Cropped image historyclient/screens/SettingsScreen.tsx- App preferencesclient/lib/image-processing.ts- Client-side API callsclient/lib/storage.ts- AsyncStorage utilitiesserver/image-processor.ts- Server-side image processing with Sharpserver/routes.ts- API route handlers
- Start Backend:
npm run server:dev(port 5000) - Start Frontend:
npm run expo:dev(port 8081) - Scan QR code with Expo Go app on mobile device
See design_guidelines.md for color palette, typography, and component specifications.
This project follows Google's TypeScript Style Guide:
- Use
interfaceovertypealiases where appropriate - Add JSDoc comments to all exported functions, interfaces, and types
- Use camelCase for variables and functions, PascalCase for types and classes
- Use explicit return types on functions
- Prefer named imports for frequently used symbols
- Organize imports: external modules first, then internal modules