본문으로 건너뛰기
cccskills
무료GitHub에 공개

image-file

Guidelines for handling image files

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md2.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Images Handling Specifications

Goals

  • Safely identify image properties and metadata without memory exhaustion.
  • Accurately extract text (OCR) and visual elements (Object Detection/Description).
  • Perform necessary pre-processing (resize, normalize, crop) for downstream tasks.
  • Handle multi-frame or high-resolution images efficiently.

Inspection (Always First)

  • Identify Properties: Use lightweight libraries (e.g., PIL/Pillow) to get format, size (width/height), and mode (RGB, RGBA, CMYK).
  • Check File Size: If the image is exceptionally large (e.g., >20MB or >100MP), consider downsampling or tiling before full processing.
  • Metadata/EXIF Extraction:
    • Read EXIF data for orientation, GPS tags, and timestamps.
    • Correction: Automatically apply EXIF orientation to ensure the image is "upright" before visual analysis.

Content Extraction & Vision

  • Vision Analysis:
    • Use multimodal vision models to describe scenes, identify objects, and detect activities.
    • For complex images (e.g., infographics, UI screenshots), guide the model to focus on specific regions.
  • OCR (Optical Character Recognition):
    • If text is detected, specify whether to extract "raw text" or "structured data" (like forms/tables).
    • Handle low-contrast or noisy backgrounds by applying pre-filters (grayscale, binarization).
  • Format Conversion: Convert non-standard formats (e.g., HEIC, TIFF) to standard formats (JPEG/PNG) if tools require it.

Handling Large or Complex Images

  • Tiling: For ultra-high-res images (e.g., satellite maps, medical scans), split into overlapping tiles to avoid missing small details.
  • Batching: Process multiple images using generators to keep memory usage stable.
  • Alpha Channel: Be mindful of transparency (PNG/WebP); decide whether to discard it or composite against a solid background (e.g., white).

Best Practices

  • Safety First: Validate that the file is a genuine image (not a renamed malicious script).
  • Graceful Failure: Handle corrupted files, truncated downloads, or unsupported formats with descriptive error logs.
  • Efficiency: Avoid unnecessary re-encoding (e.g., multiple JPEG saves) to prevent "generation loss" or artifacts.
  • Process images individually or in small batches to prevent system crashes
  • Consider memory usage when working with large or high-resolution images
  • Resource Management: Close file pointers or use context managers (with Image.open(...) as img:) to prevent memory leaks.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guidelines for handling CSV/Excel files

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

agentscope-ai/agentscope-samples3512026년 4월 10일 업데이트

database

무료

Guidelines for handling databases

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

agentscope-ai/agentscope-samples3512026년 4월 10일 업데이트

json-file

무료

Guildlines for handling json files

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

agentscope-ai/agentscope-samples3512026년 4월 10일 업데이트

text-file

무료

Guidelines for handling text files

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

agentscope-ai/agentscope-samples3512026년 4월 10일 업데이트

agentscope-ai의 스킬 모두 보기

이 스킬의 문제 신고