Skip to content

Image Processing

Resize, crop, compress, convert, OCR, QR codes, and watermarks.

9 modules

ModuleDescription
इमेज संपीड़ित करेंगुणवत्ता बनाए रखते हुए फ़ाइल आकार कम करने के लिए इमेज संपीड़ित करें
इमेज कन्वर्ट करेंइमेज को अलग फ़ॉर्मेट में बदलें (PNG, JPEG, WEBP, आदि)
छवि क्रॉप करेंछवि को निर्दिष्ट निर्देशांक पर क्रॉप करें
इमेज डाउनलोड करेंURL से इमेज स्थानीय फ़ाइल में डाउनलोड करें
OCR पाठ निकालेंOCR का उपयोग करके छवियों से पाठ निकालें
QR कोड जनरेट करेंटेक्स्ट, URLs, या डेटा से QR कोड जनरेट करें
इमेज आकार बदलेंविभिन्न एल्गोरिदम के साथ इमेज को निर्दिष्ट आयामों में आकार बदलें
छवि घुमाएँछवि को निर्दिष्ट डिग्री पर घुमाएँ
वॉटरमार्क जोड़ेंछवि में पाठ या छवि वॉटरमार्क जोड़ें

Modules

इमेज संपीड़ित करें

image.compress

गुणवत्ता बनाए रखते हुए फ़ाइल आकार कम करने के लिए इमेज संपीड़ित करें

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-Path to the input image file
output_pathstringNo-Path where the processed image will be saved
qualitynumberNo85Quality level (1-100, higher is better)
optimizebooleanNoTrueApply additional optimization
max_size_kbnumberNo-Target maximum file size in KB
formatselect (png, jpeg, webp, gif, bmp, tiff)NopngOutput image format

Output:

FieldTypeDescription
output_pathstringसंपीड़ित इमेज का पथ
original_size_bytesnumberसंपीड़ित इमेज का पथ
compressed_size_bytesnumberबाइट्स में मूल फ़ाइल आकार
compression_rationumberबाइट्स में संपीड़ित फ़ाइल आकार

Example: Compress with quality setting

yaml
input_path: /path/to/image.jpg
quality: 75

Example: Compress to target size

yaml
input_path: /path/to/image.png
max_size_kb: 500

इमेज कन्वर्ट करें

image.convert

इमेज को अलग फ़ॉर्मेट में बदलें (PNG, JPEG, WEBP, आदि)

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-Path to the input image file
output_pathstringNo-Path where the processed image will be saved
formatselect (png, jpeg, webp, gif, bmp, tiff)YespngOutput image format
qualitynumberNo85Quality level (1-100, higher is better)
resizeobjectNo-Resize options:

Output:

FieldTypeDescription
pathstringकन्वर्ट की गई इमेज का पथ
sizenumberकन्वर्ट की गई इमेज का पथ
formatstringकन्वर्ट की गई इमेज का पथ
dimensionsobjectबाइट्स में फ़ाइल आकार

Example: Convert PNG to JPEG

yaml
input_path: /tmp/image.png
format: jpeg
quality: 90

छवि क्रॉप करें

image.crop

छवि को निर्दिष्ट निर्देशांक पर क्रॉप करें

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-इनपुट छवि का पथ
output_pathstringYes-आउटपुट छवि के लिए पथ
leftnumberYes-क्रॉप क्षेत्र का बायाँ निर्देशांक
topnumberYes-क्रॉप क्षेत्र का ऊपरी निर्देशांक
rightnumberYes-क्रॉप क्षेत्र का दायाँ निर्देशांक
bottomnumberYes-क्रॉप क्षेत्र का निचला निर्देशांक

Output:

FieldTypeDescription
output_pathstringक्रॉप की गई छवि का पथ
widthintegerक्रॉप की गई छवि की चौड़ाई
heightintegerक्रॉप की गई छवि की ऊँचाई
original_widthintegerमूल छवि की चौड़ाई
original_heightintegerमूल छवि की ऊँचाई

Example: Crop center region

yaml
input_path: /path/to/image.png
output_path: /path/to/cropped.png
left: 100
top: 100
right: 500
bottom: 400

इमेज डाउनलोड करें

image.download

URL से इमेज स्थानीय फ़ाइल में डाउनलोड करें

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL of the image to download
output_pathstringNo-Path where the processed image will be saved
output_dirstringNo/tmpDirectory where output files will be saved
headersobjectNo{}HTTP request headers as key-value pairs
timeoutnumberNo30Maximum time to wait in seconds

Output:

FieldTypeDescription
pathstringडाउनलोड की गई इमेज का स्थानीय फ़ाइल पथ
sizenumberडाउनलोड की गई इमेज का स्थानीय फ़ाइल पथ
content_typestringडाउनलोड की गई इमेज का स्थानीय फ़ाइल पथ
filenamestringबाइट्स में फ़ाइल आकार

Example: Download image from URL

yaml
url: https://example.com/photo.jpg
output_dir: /tmp/images

OCR पाठ निकालें

image.ocr

OCR का उपयोग करके छवियों से पाठ निकालें

Parameters:

NameTypeRequiredDefaultDescription
image_pathstringYes-छवि फ़ाइल का पथ
languagestringNoengOCR के लिए भाषा कोड (जैसे eng, chi_sim)
psmnumberNo3Tesseract पृष्ठ विभाजन मोड
output_typeselect (text, data, boxes)NotextOCR आउटपुट का प्रकार (पाठ या डेटा)

Output:

FieldTypeDescription
textstringछवि से निकाला गया पाठ
confidencenumberOCR विश्वास स्कोर
languagestringOCR के लिए उपयोग की गई भाषा

Example: Extract text from image

yaml
image_path: /path/to/document.png
language: eng

QR कोड जनरेट करें

image.qrcode_generate

टेक्स्ट, URLs, या डेटा से QR कोड जनरेट करें

Parameters:

NameTypeRequiredDefaultDescription
datastringYes-Text, URL, or data to encode
output_pathstringNo-Path where the processed image will be saved
formatselect (png, svg)NopngOutput image format
sizenumberNo300Size in pixels
colorstringNo#000000Color of the QR code (hex or name)
backgroundstringNo#FFFFFFBackground color (hex or name)
error_correctionselect (L, M, Q, H)NoMError correction level
bordernumberNo4Border width in modules (quiet zone)
versionnumberNo-QR code version 1-40 (leave empty for auto-detect)
logo_pathstringNo-Path to logo image to embed in center

Output:

FieldTypeDescription
output_pathstringजनरेट की गई QR कोड इमेज का पथ
file_sizenumberजनरेट की गई QR कोड इमेज का पथ
dimensionsobjectबाइट्स में आउटपुट फ़ाइल का आकार

Example: Generate URL QR code

yaml
data: https://flyto.dev
output_path: /tmp/flyto_qr.png

Example: Custom styled QR code

yaml
data: Hello World
color: #6366F1
size: 500
error_correction: H

Example: SVG QR code

yaml
data: https://flyto.dev
format: svg
border: 2

इमेज आकार बदलें

image.resize

विभिन्न एल्गोरिदम के साथ इमेज को निर्दिष्ट आयामों में आकार बदलें

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-Path to the input image file
output_pathstringNo-Path where the processed image will be saved
widthnumberNo-Target width in pixels
heightnumberNo-Target height in pixels
scalenumberNo-Scale factor (e.g., 0.5 for half, 2.0 for double)
algorithmselect (lanczos, bicubic, bilinear, nearest)NolanczosResampling algorithm for resize
maintain_aspectbooleanNoTrueMaintain original aspect ratio

Output:

FieldTypeDescription
output_pathstringआकार बदली गई इमेज का पथ
original_sizeobjectआकार बदली गई इमेज का पथ
new_sizeobjectआकार बदली गई इमेज का पथ

Example: Resize to specific dimensions

yaml
input_path: /path/to/image.png
width: 800
height: 600

Example: Scale by factor

yaml
input_path: /path/to/image.png
scale: 0.5

छवि घुमाएँ

image.rotate

छवि को निर्दिष्ट डिग्री पर घुमाएँ

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-इनपुट छवि का पथ
output_pathstringYes-आउटपुट छवि के लिए पथ
anglenumberYes-डिग्री में घुमाव का कोण
expandbooleanNoTrueपूरी घुमाई गई छवि को समायोजित करने के लिए आउटपुट का विस्तार करें
fill_colorstringNo#000000घुमाव के बाद खाली क्षेत्रों को भरने का रंग

Output:

FieldTypeDescription
output_pathstringघुमाई गई छवि का पथ
widthintegerघुमाई गई छवि की चौड़ाई
heightintegerघुमाई गई छवि की ऊँचाई
anglenumberछवि को जितना घुमाया गया था

Example: Rotate 90 degrees

yaml
input_path: /path/to/image.png
output_path: /path/to/rotated.png
angle: 90

वॉटरमार्क जोड़ें

image.watermark

छवि में पाठ या छवि वॉटरमार्क जोड़ें

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-इनपुट छवि का पथ
output_pathstringYes-आउटपुट छवि का पथ
textstringNo-वॉटरमार्क के रूप में उपयोग करने के लिए पाठ
watermark_imagestringNo-वॉटरमार्क के रूप में उपयोग करने के लिए छवि फ़ाइल का पथ
positionselect (center, top-left, top-right, bottom-left, bottom-right)Nobottom-rightछवि पर वॉटरमार्क की स्थिति
opacitynumberNo0.5वॉटरमार्क की अस्पष्टता (0.0 से 1.0)
font_sizenumberNo36पाठ वॉटरमार्क के लिए फ़ॉन्ट आकार

Output:

FieldTypeDescription
output_pathstringवॉटरमार्क वाली छवि का पथ
watermark_typestringलागू वॉटरमार्क का प्रकार (पाठ या छवि)

Example: Add text watermark

yaml
input_path: /path/to/image.png
output_path: /path/to/watermarked.png
text: © 2026 Company
position: bottom-right
opacity: 0.5

Released under the Apache 2.0 License.