mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
5.6 KiB
5.6 KiB
description, i18n_source_hash, i18n_provenance, i18n_output_hash
| description | i18n_source_hash | i18n_provenance | i18n_output_hash |
|---|---|---|---|
| एनोटेट किए गए आउटपुट के साथ QR कोड, बारकोड, और 2D कोड के लिए छवियाँ स्कैन करें। | 97c9d395c257 | human | 90b11a4e02c4 |
Barcode Reader
अपलोड की गई छवियों को सभी प्रकार के बारकोड और QR कोड के लिए स्कैन करें। प्रत्येक पहचाने गए कोड के लिए डिकोड किया गया टेक्स्ट, बारकोड प्रकार, और स्थिति डेटा लौटाता है। पहचाने गए कोड के चारों ओर रंगीन बाउंडिंग बॉक्स के साथ एक एनोटेट की गई छवि भी उत्पन्न करता है।
API Endpoint
POST /api/v1/tools/image/barcode-read
एक छवि फ़ाइल और एक वैकल्पिक JSON settings फ़ील्ड के साथ multipart form data स्वीकार करता है।
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| tryHarder | boolean | No | true |
कठिन-पढ़ने वाले बारकोड के लिए आक्रामक स्कैनिंग मोड सक्षम करें (धीमा लेकिन अधिक गहन) |
Example Request
curl -X POST http://localhost:1349/api/v1/tools/image/barcode-read \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@receipt.jpg" \
-F 'settings={"tryHarder": true}'
Example Response
{
"filename": "receipt.jpg",
"barcodes": [
{
"type": "QRCode",
"text": "https://example.com/product/123",
"position": {
"topLeft": { "x": 100, "y": 50 },
"topRight": { "x": 250, "y": 50 },
"bottomLeft": { "x": 100, "y": 200 },
"bottomRight": { "x": 250, "y": 200 }
}
},
{
"type": "EAN-13",
"text": "5901234123457",
"position": {
"topLeft": { "x": 50, "y": 400 },
"topRight": { "x": 300, "y": 400 },
"bottomLeft": { "x": 50, "y": 450 },
"bottomRight": { "x": 300, "y": 450 }
}
}
],
"annotatedUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/annotated-receipt.png",
"previewUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/annotated-receipt.png"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| filename | string | मूल फ़ाइल नाम |
| barcodes | array | पहचाने गए बारकोड ऑब्जेक्ट्स की सरणी |
| annotatedUrl | string or null | एनोटेट की गई छवि डाउनलोड करने का URL (कोई बारकोड न मिलने पर null) |
| previewUrl | string or null | annotatedUrl के समान (फ्रंटएंड पूर्वावलोकन संगतता के लिए) |
Barcode Object
| Field | Type | Description |
|---|---|---|
| type | string | बारकोड प्रारूप (QRCode, EAN-13, Code128, DataMatrix, PDF417, आदि) |
| text | string | बारकोड की डिकोड की गई सामग्री |
| position | object | topLeft, topRight, bottomLeft, bottomRight निर्देशांक के साथ बाउंडिंग बॉक्स |
Supported Barcode Types
1D बारकोड: Code128, Code39, Code93, Codabar, EAN-8, EAN-13, ITF, UPC-A, UPC-E
2D बारकोड: QRCode, DataMatrix, PDF417, Aztec, MaxiCode
Notes
- बारकोड पहचान के लिए zxing-wasm लाइब्रेरी का उपयोग करता है।
- एनोटेट की गई छवि प्रत्येक पहचाने गए बारकोड पर रंगीन बहुभुज बाउंडिंग बॉक्स और क्रमांकित लेबल ओवरले करती है।
- एक ही छवि में 255 तक बारकोड पहचाने जा सकते हैं।
- यदि कोई बारकोड नहीं मिलता है, तो
barcodesएक खाली सरणी होती है औरannotatedUrlnull होता है। tryHarderमोड प्रोसेसिंग समय की कीमत पर अधिक गहन स्कैनिंग करता है। साफ़, अच्छी तरह संरेखित बारकोड की तेज़ प्रोसेसिंग के लिए इसे अक्षम करें।- एनोटेट किया गया आउटपुट हमेशा PNG प्रारूप में होता है।
- HEIC, RAW, PSD, और SVG इनपुट को स्कैन करने से पहले स्वचालित रूप से डिकोड किया जाता है।
- प्रोसेसिंग से पहले EXIF ओरिएंटेशन स्वतः लागू किया जाता है।