2026-03-22 02:44:43 +08:00
|
|
|
import type { CategoryInfo, SocialMediaPreset, Tool } from "./types.js";
|
|
|
|
|
|
|
|
|
|
export const CATEGORIES: CategoryInfo[] = [
|
|
|
|
|
{ id: "essentials", name: "Essentials", icon: "Layers", color: "#3B82F6" },
|
|
|
|
|
{ id: "optimization", name: "Optimization", icon: "Zap", color: "#10B981" },
|
|
|
|
|
{ id: "adjustments", name: "Adjustments", icon: "SlidersHorizontal", color: "#8B5CF6" },
|
|
|
|
|
{ id: "ai", name: "AI Tools", icon: "Sparkles", color: "#F59E0B" },
|
|
|
|
|
{ id: "watermark", name: "Watermark & Overlay", icon: "Stamp", color: "#EF4444" },
|
|
|
|
|
{ id: "utilities", name: "Utilities", icon: "Wrench", color: "#6366F1" },
|
|
|
|
|
{ id: "layout", name: "Layout & Composition", icon: "LayoutGrid", color: "#EC4899" },
|
|
|
|
|
{ id: "format", name: "Format & Conversion", icon: "FileType", color: "#14B8A6" },
|
|
|
|
|
{ id: "automation", name: "Automation", icon: "Workflow", color: "#F97316" },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const TOOLS: Tool[] = [
|
|
|
|
|
// Essentials
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "resize",
|
|
|
|
|
name: "Resize",
|
|
|
|
|
description: "Resize by pixels, percentage, or social media presets",
|
|
|
|
|
category: "essentials",
|
|
|
|
|
icon: "Maximize2",
|
|
|
|
|
route: "/resize",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "crop",
|
|
|
|
|
name: "Crop",
|
|
|
|
|
description: "Freeform crop, aspect ratio presets, shape crop",
|
|
|
|
|
category: "essentials",
|
|
|
|
|
icon: "Crop",
|
|
|
|
|
route: "/crop",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "rotate",
|
|
|
|
|
name: "Rotate & Flip",
|
|
|
|
|
description: "Rotate, flip, and straighten images",
|
|
|
|
|
category: "essentials",
|
|
|
|
|
icon: "RotateCw",
|
|
|
|
|
route: "/rotate",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "convert",
|
|
|
|
|
name: "Convert",
|
|
|
|
|
description: "Convert between image formats",
|
|
|
|
|
category: "essentials",
|
|
|
|
|
icon: "FileOutput",
|
|
|
|
|
route: "/convert",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "compress",
|
|
|
|
|
name: "Compress",
|
|
|
|
|
description: "Reduce file size by quality or target size",
|
|
|
|
|
category: "essentials",
|
|
|
|
|
icon: "Minimize2",
|
|
|
|
|
route: "/compress",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Optimization
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "strip-metadata",
|
2026-04-12 08:50:19 +08:00
|
|
|
name: "Remove Metadata",
|
2026-03-25 09:27:12 +08:00
|
|
|
description: "Remove EXIF, GPS, and camera info",
|
|
|
|
|
category: "optimization",
|
|
|
|
|
icon: "ShieldOff",
|
|
|
|
|
route: "/strip-metadata",
|
|
|
|
|
},
|
2026-04-06 19:23:18 +08:00
|
|
|
{
|
|
|
|
|
id: "edit-metadata",
|
|
|
|
|
name: "Edit Metadata",
|
|
|
|
|
description: "Edit EXIF, GPS, and camera info",
|
|
|
|
|
category: "optimization",
|
|
|
|
|
icon: "PenLine",
|
|
|
|
|
route: "/edit-metadata",
|
|
|
|
|
},
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "bulk-rename",
|
|
|
|
|
name: "Bulk Rename",
|
|
|
|
|
description: "Rename multiple files with patterns",
|
|
|
|
|
category: "optimization",
|
|
|
|
|
icon: "FileEdit",
|
|
|
|
|
route: "/bulk-rename",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "image-to-pdf",
|
|
|
|
|
name: "Image to PDF",
|
|
|
|
|
description: "Combine images into a PDF document",
|
|
|
|
|
category: "optimization",
|
|
|
|
|
icon: "FileText",
|
|
|
|
|
route: "/image-to-pdf",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "favicon",
|
|
|
|
|
name: "Favicon Generator",
|
|
|
|
|
description: "Generate all favicon and app icon sizes",
|
|
|
|
|
category: "optimization",
|
|
|
|
|
icon: "Globe",
|
|
|
|
|
route: "/favicon",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Adjustments
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
2026-04-12 17:53:16 +08:00
|
|
|
id: "adjust-colors",
|
|
|
|
|
name: "Adjust Colors",
|
|
|
|
|
description: "Brightness, contrast, exposure, saturation, temperature, sharpness, and effects",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "adjustments",
|
2026-04-12 17:53:16 +08:00
|
|
|
icon: "SlidersHorizontal",
|
|
|
|
|
route: "/adjust-colors",
|
2026-03-25 09:27:12 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "replace-color",
|
|
|
|
|
name: "Replace & Invert Color",
|
|
|
|
|
description: "Replace specific colors or invert",
|
|
|
|
|
category: "adjustments",
|
|
|
|
|
icon: "Pipette",
|
|
|
|
|
route: "/replace-color",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// AI Tools
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "remove-background",
|
|
|
|
|
name: "Remove Background",
|
|
|
|
|
description: "AI-powered background removal",
|
|
|
|
|
category: "ai",
|
|
|
|
|
icon: "Eraser",
|
|
|
|
|
route: "/remove-background",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "upscale",
|
|
|
|
|
name: "Image Upscaling",
|
|
|
|
|
description: "AI super-resolution enhancement",
|
|
|
|
|
category: "ai",
|
|
|
|
|
icon: "ZoomIn",
|
|
|
|
|
route: "/upscale",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "erase-object",
|
|
|
|
|
name: "Object Eraser",
|
2026-04-13 00:47:53 +08:00
|
|
|
description: "Remove unwanted objects with AI",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "ai",
|
|
|
|
|
icon: "Wand2",
|
|
|
|
|
route: "/erase-object",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "ocr",
|
|
|
|
|
name: "OCR / Text Extraction",
|
|
|
|
|
description: "Extract text from images",
|
|
|
|
|
category: "ai",
|
|
|
|
|
icon: "ScanText",
|
|
|
|
|
route: "/ocr",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "blur-faces",
|
|
|
|
|
name: "Face / PII Blur",
|
|
|
|
|
description: "Auto-detect and blur faces and sensitive info",
|
|
|
|
|
category: "ai",
|
|
|
|
|
icon: "EyeOff",
|
|
|
|
|
route: "/blur-faces",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "smart-crop",
|
|
|
|
|
name: "Smart Crop",
|
2026-04-13 00:47:53 +08:00
|
|
|
description: "Smart subject, face, or trim-based cropping",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "ai",
|
|
|
|
|
icon: "Focus",
|
|
|
|
|
route: "/smart-crop",
|
|
|
|
|
},
|
2026-04-13 17:48:53 +08:00
|
|
|
{
|
|
|
|
|
id: "image-enhancement",
|
|
|
|
|
name: "Image Enhancement",
|
|
|
|
|
description: "One-click auto-improve with smart analysis",
|
|
|
|
|
category: "ai",
|
|
|
|
|
icon: "Sparkles",
|
|
|
|
|
route: "/image-enhancement",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Watermark & Overlay
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "watermark-text",
|
|
|
|
|
name: "Text Watermark",
|
|
|
|
|
description: "Add text watermark overlay",
|
|
|
|
|
category: "watermark",
|
|
|
|
|
icon: "Type",
|
|
|
|
|
route: "/watermark-text",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "watermark-image",
|
|
|
|
|
name: "Image Watermark",
|
|
|
|
|
description: "Overlay a logo as watermark",
|
|
|
|
|
category: "watermark",
|
|
|
|
|
icon: "Image",
|
|
|
|
|
route: "/watermark-image",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "text-overlay",
|
|
|
|
|
name: "Text Overlay",
|
|
|
|
|
description: "Add styled text to images",
|
|
|
|
|
category: "watermark",
|
|
|
|
|
icon: "TextCursorInput",
|
|
|
|
|
route: "/text-overlay",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "compose",
|
|
|
|
|
name: "Image Composition",
|
|
|
|
|
description: "Layer images with position and opacity",
|
|
|
|
|
category: "watermark",
|
|
|
|
|
icon: "Layers",
|
|
|
|
|
route: "/compose",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Utilities
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "info",
|
|
|
|
|
name: "Image Info",
|
|
|
|
|
description: "View all metadata and image properties",
|
|
|
|
|
category: "utilities",
|
|
|
|
|
icon: "Info",
|
|
|
|
|
route: "/info",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "compare",
|
|
|
|
|
name: "Image Compare",
|
|
|
|
|
description: "Side-by-side comparison of two images",
|
|
|
|
|
category: "utilities",
|
|
|
|
|
icon: "Columns2",
|
|
|
|
|
route: "/compare",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "find-duplicates",
|
|
|
|
|
name: "Find Duplicates",
|
|
|
|
|
description: "Detect duplicate and near-duplicate images",
|
|
|
|
|
category: "utilities",
|
|
|
|
|
icon: "Copy",
|
|
|
|
|
route: "/find-duplicates",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "color-palette",
|
|
|
|
|
name: "Color Palette",
|
|
|
|
|
description: "Extract dominant colors from image",
|
|
|
|
|
category: "utilities",
|
|
|
|
|
icon: "Palette",
|
|
|
|
|
route: "/color-palette",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "qr-generate",
|
|
|
|
|
name: "QR Code Generator",
|
2026-04-13 09:59:12 +08:00
|
|
|
description: "Generate styled QR codes with custom colors, patterns, and logos",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "utilities",
|
|
|
|
|
icon: "QrCode",
|
|
|
|
|
route: "/qr-generate",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "barcode-read",
|
|
|
|
|
name: "Barcode Reader",
|
2026-04-13 16:23:07 +08:00
|
|
|
description: "Scan images for QR codes, barcodes, and 2D codes",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "utilities",
|
|
|
|
|
icon: "ScanLine",
|
|
|
|
|
route: "/barcode-read",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Layout & Composition
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "collage",
|
|
|
|
|
name: "Collage / Grid",
|
2026-04-13 16:23:07 +08:00
|
|
|
description: "Combine images into beautiful grid collages with 25+ templates",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "layout",
|
|
|
|
|
icon: "LayoutGrid",
|
|
|
|
|
route: "/collage",
|
|
|
|
|
},
|
2026-04-07 21:49:46 +08:00
|
|
|
{
|
|
|
|
|
id: "stitch",
|
2026-04-13 16:23:07 +08:00
|
|
|
name: "Stitch / Combine",
|
|
|
|
|
description: "Join images side by side, stacked, or in a grid",
|
2026-04-07 21:49:46 +08:00
|
|
|
category: "layout",
|
|
|
|
|
icon: "Columns",
|
|
|
|
|
route: "/stitch",
|
|
|
|
|
},
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "split",
|
|
|
|
|
name: "Image Splitting",
|
2026-04-13 16:23:07 +08:00
|
|
|
description: "Split images into grid tiles or by pixel size with live preview",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "layout",
|
|
|
|
|
icon: "Grid3x3",
|
|
|
|
|
route: "/split",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "border",
|
|
|
|
|
name: "Border & Frame",
|
|
|
|
|
description: "Add borders, rounded corners, shadows",
|
|
|
|
|
category: "layout",
|
|
|
|
|
icon: "Frame",
|
|
|
|
|
route: "/border",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Format & Conversion
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "svg-to-raster",
|
|
|
|
|
name: "SVG to Raster",
|
2026-04-13 12:52:33 +08:00
|
|
|
description: "Convert SVG to PNG, JPEG, WebP, AVIF, TIFF, GIF, or HEIF at custom scale and DPI",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "format",
|
|
|
|
|
icon: "FileImage",
|
|
|
|
|
route: "/svg-to-raster",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "vectorize",
|
|
|
|
|
name: "Image to SVG",
|
|
|
|
|
description: "Vectorize images using tracing",
|
|
|
|
|
category: "format",
|
|
|
|
|
icon: "PenTool",
|
|
|
|
|
route: "/vectorize",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "gif-tools",
|
|
|
|
|
name: "GIF Tools",
|
2026-04-13 16:23:07 +08:00
|
|
|
description:
|
|
|
|
|
"Resize, optimize, change speed, reverse, extract frames, and rotate animated GIFs",
|
2026-03-25 09:27:12 +08:00
|
|
|
category: "format",
|
|
|
|
|
icon: "Film",
|
|
|
|
|
route: "/gif-tools",
|
|
|
|
|
},
|
2026-04-05 22:56:15 +08:00
|
|
|
{
|
|
|
|
|
id: "pdf-to-image",
|
|
|
|
|
name: "PDF to Image",
|
|
|
|
|
description: "Convert PDF pages to images",
|
|
|
|
|
category: "format",
|
|
|
|
|
icon: "FileOutput",
|
|
|
|
|
route: "/pdf-to-image",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
// Automation
|
2026-03-25 09:27:12 +08:00
|
|
|
{
|
|
|
|
|
id: "pipeline",
|
|
|
|
|
name: "Pipeline Builder",
|
|
|
|
|
description: "Chain multiple tools into a workflow",
|
|
|
|
|
category: "automation",
|
|
|
|
|
icon: "Workflow",
|
|
|
|
|
route: "/pipeline",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "batch",
|
|
|
|
|
name: "Batch Processing",
|
|
|
|
|
description: "Apply any tool to multiple images",
|
|
|
|
|
category: "automation",
|
|
|
|
|
icon: "FolderInput",
|
|
|
|
|
route: "/batch",
|
|
|
|
|
},
|
2026-03-22 02:44:43 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const SOCIAL_MEDIA_PRESETS: SocialMediaPreset[] = [
|
|
|
|
|
{ platform: "Instagram", name: "Post (Square)", width: 1080, height: 1080 },
|
|
|
|
|
{ platform: "Instagram", name: "Story / Reel", width: 1080, height: 1920 },
|
|
|
|
|
{ platform: "Instagram", name: "Profile Picture", width: 320, height: 320 },
|
|
|
|
|
{ platform: "Instagram", name: "Landscape Post", width: 1080, height: 566 },
|
|
|
|
|
{ platform: "Instagram", name: "Portrait Post", width: 1080, height: 1350 },
|
|
|
|
|
{ platform: "Twitter/X", name: "Post Image", width: 1200, height: 675 },
|
|
|
|
|
{ platform: "Twitter/X", name: "Header", width: 1500, height: 500 },
|
|
|
|
|
{ platform: "Twitter/X", name: "Profile Picture", width: 400, height: 400 },
|
|
|
|
|
{ platform: "Facebook", name: "Post Image", width: 1200, height: 630 },
|
|
|
|
|
{ platform: "Facebook", name: "Cover Photo", width: 820, height: 312 },
|
|
|
|
|
{ platform: "Facebook", name: "Profile Picture", width: 170, height: 170 },
|
|
|
|
|
{ platform: "Facebook", name: "Event Cover", width: 1920, height: 1005 },
|
|
|
|
|
{ platform: "YouTube", name: "Thumbnail", width: 1280, height: 720 },
|
|
|
|
|
{ platform: "YouTube", name: "Channel Banner", width: 2560, height: 1440 },
|
|
|
|
|
{ platform: "YouTube", name: "Profile Picture", width: 800, height: 800 },
|
|
|
|
|
{ platform: "LinkedIn", name: "Post Image", width: 1200, height: 627 },
|
|
|
|
|
{ platform: "LinkedIn", name: "Banner", width: 1584, height: 396 },
|
|
|
|
|
{ platform: "LinkedIn", name: "Profile Picture", width: 400, height: 400 },
|
|
|
|
|
{ platform: "TikTok", name: "Video Cover", width: 1080, height: 1920 },
|
|
|
|
|
{ platform: "TikTok", name: "Profile Picture", width: 200, height: 200 },
|
|
|
|
|
{ platform: "WhatsApp", name: "Profile Picture", width: 500, height: 500 },
|
|
|
|
|
{ platform: "Pinterest", name: "Pin", width: 1000, height: 1500 },
|
|
|
|
|
{ platform: "Threads", name: "Post Image", width: 1080, height: 1080 },
|
|
|
|
|
];
|
|
|
|
|
|
2026-04-13 00:47:53 +08:00
|
|
|
export interface SmartCropFacePreset {
|
|
|
|
|
id: string;
|
|
|
|
|
label: string;
|
|
|
|
|
multiplier: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SMART_CROP_FACE_PRESETS: SmartCropFacePreset[] = [
|
|
|
|
|
{ id: "closeup", label: "Close-up", multiplier: 1.8 },
|
|
|
|
|
{ id: "head-shoulders", label: "Head & Shoulders", multiplier: 2.8 },
|
|
|
|
|
{ id: "upper-body", label: "Upper Body", multiplier: 4.5 },
|
|
|
|
|
{ id: "half-body", label: "Half Body", multiplier: 7.0 },
|
|
|
|
|
];
|
|
|
|
|
|
2026-04-10 14:13:37 +00:00
|
|
|
export const APP_VERSION = "1.14.0";
|
2026-04-05 00:23:21 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tool IDs that require the Python sidecar (AI/ML tools).
|
2026-04-10 17:38:54 +08:00
|
|
|
* Used by the frontend for progress/timeout behavior.
|
2026-04-05 00:23:21 +08:00
|
|
|
*/
|
|
|
|
|
export const PYTHON_SIDECAR_TOOLS = [
|
|
|
|
|
"remove-background",
|
|
|
|
|
"upscale",
|
|
|
|
|
"blur-faces",
|
|
|
|
|
"erase-object",
|
|
|
|
|
"ocr",
|
|
|
|
|
] as const;
|