Skip to content

Image Processing

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

9 modules

ModuleDescription
이미지 압축품질 유지하면서 파일 크기를 줄이기 위해 이미지 압축
이미지 변환이미지를 다른 형식으로 변환 (PNG, JPEG, WEBP 등)
이미지 자르기이미지를 지정된 좌표로 자르기
이미지 다운로드URL에서 로컬 파일로 이미지 다운로드
OCR 텍스트 추출OCR을 사용하여 이미지에서 텍스트 추출
QR 코드 생성텍스트, URL 또는 데이터에서 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

텍스트, URL 또는 데이터에서 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.