Add OCR, Background Removal, and PDF Editor features with tests

- Implemented OCR functionality using pytesseract for image and PDF text extraction.
- Added Background Removal service using rembg for image processing.
- Developed PDF Editor service for applying text annotations to PDF files.
- Created corresponding API routes for OCR, Background Removal, and PDF Editor.
- Added frontend components for OCR and Background Removal tools.
- Integrated feature flagging for new tools, ensuring they are disabled by default.
- Implemented comprehensive unit tests for OCR service, PDF editor, and background removal.
- Updated documentation to reflect new features and usage instructions.
- Added translations for new features in English, Arabic, and French.
This commit is contained in:
Your Name
2026-03-07 21:29:08 +02:00
parent 71f7d0382d
commit 6bb76e3f1b
28 changed files with 1975 additions and 0 deletions

View File

@@ -110,6 +110,25 @@
"lockAspect": "قفل نسبة العرض للارتفاع",
"aspectHint": "أدخل بُعداً واحداً — سيتم حساب الآخر تلقائياً للحفاظ على نسبة العرض للارتفاع."
},
"ocr": {
"title": "OCR — التعرف على النصوص",
"description": "استخرج النصوص من الصور ومستندات PDF الممسوحة ضوئياً باستخدام التعرف الضوئي على الحروف.",
"shortDesc": "استخراج نص",
"sourceType": "نوع المصدر",
"modeImage": "صورة",
"modePdf": "PDF",
"language": "لغة التعرف",
"extract": "استخراج النص",
"charsExtracted": "تم استخراج {{count}} حرف",
"copyText": "نسخ النص"
},
"removeBg": {
"title": "إزالة الخلفية",
"description": "أزل خلفية الصور تلقائياً بالذكاء الاصطناعي. احصل على صورة PNG شفافة في ثوانٍ.",
"shortDesc": "إزالة الخلفية",
"remove": "إزالة الخلفية",
"success": "تمت إزالة الخلفية بنجاح!"
},
"videoToGif": {
"title": "فيديو إلى GIF",
"description": "أنشئ صور GIF متحركة من مقاطع الفيديو. خصّص وقت البداية والمدة والجودة.",

View File

@@ -110,6 +110,25 @@
"lockAspect": "Lock aspect ratio",
"aspectHint": "Enter one dimension — the other will auto-calculate to preserve aspect ratio."
},
"ocr": {
"title": "OCR — Text Recognition",
"description": "Extract text from images and scanned PDF documents using optical character recognition.",
"shortDesc": "Extract Text",
"sourceType": "Source Type",
"modeImage": "Image",
"modePdf": "PDF",
"language": "OCR Language",
"extract": "Extract Text",
"charsExtracted": "{{count}} characters extracted",
"copyText": "Copy Text"
},
"removeBg": {
"title": "Remove Background",
"description": "Remove the background from images automatically using AI. Get a transparent PNG in seconds.",
"shortDesc": "Remove BG",
"remove": "Remove Background",
"success": "Background removed successfully!"
},
"videoToGif": {
"title": "Video to GIF",
"description": "Create animated GIFs from video clips. Customize start time, duration, and quality.",

View File

@@ -110,6 +110,25 @@
"lockAspect": "Verrouiller le rapport d'aspect",
"aspectHint": "Entrez une dimension — l'autre sera calculée automatiquement pour préserver le rapport d'aspect."
},
"ocr": {
"title": "OCR — Reconnaissance de texte",
"description": "Extrayez le texte des images et des documents PDF numérisés grâce à la reconnaissance optique de caractères.",
"shortDesc": "Extraire le texte",
"sourceType": "Type de source",
"modeImage": "Image",
"modePdf": "PDF",
"language": "Langue OCR",
"extract": "Extraire le texte",
"charsExtracted": "{{count}} caractères extraits",
"copyText": "Copier le texte"
},
"removeBg": {
"title": "Supprimer l'arrière-plan",
"description": "Supprimez l'arrière-plan des images automatiquement grâce à l'IA. Obtenez un PNG transparent en quelques secondes.",
"shortDesc": "Suppr. arrière-plan",
"remove": "Supprimer l'arrière-plan",
"success": "Arrière-plan supprimé avec succès !"
},
"videoToGif": {
"title": "Vidéo en GIF",
"description": "Créez des GIFs animés à partir de clips vidéo. Personnalisez le temps de début, la durée et la qualité.",