Initial commit to new repository
This commit is contained in:
75
dist/AxCopilot/skills/image-processor.skill.md
vendored
Normal file
75
dist/AxCopilot/skills/image-processor.skill.md
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
name: image-processor
|
||||
label: 이미지 처리
|
||||
description: Python Pillow를 사용하여 이미지 리사이즈, 크롭, 워터마크, 포맷 변환을 수행합니다.
|
||||
icon: \uEB9F
|
||||
requires: python
|
||||
tabs: cowork
|
||||
---
|
||||
|
||||
사용자의 요구에 맞게 이미지를 처리하세요.
|
||||
|
||||
## 사전 준비
|
||||
먼저 Pillow 패키지가 설치되어 있<><EC9E88>지 확인하고, 없으면 설<><EC84A4><EFBFBD>하세요:
|
||||
```
|
||||
process_run: pip install Pillow
|
||||
```
|
||||
|
||||
## 작업 절<><ECA088>
|
||||
1. **요구사항 파악**: 처리할 이미지 파일과 원하는 작업 확인
|
||||
2. **Python 스크립트 작성**: file_write로 .py 파일 생성
|
||||
3. **스크립트 실행**: process_run으로 Python 스크립<ED81AC><EBA6BD> 실행
|
||||
4. **결과 확인**: 처리된 이미지 파일 경로를 사용자에게 안내
|
||||
|
||||
## 지원 기능
|
||||
|
||||
### 리사이즈
|
||||
```python
|
||||
from PIL import Image
|
||||
img = Image.open('input.png')
|
||||
img_resized = img.resize((800, 600)) # 고정 크기
|
||||
# 또는 비율 유지
|
||||
img.thumbnail((800, 800))
|
||||
img.save('output.png')
|
||||
```
|
||||
|
||||
### 크롭
|
||||
```python
|
||||
img = Image.open('input.png')
|
||||
cropped = img.crop((left, top, right, bottom))
|
||||
cropped.save('output.png')
|
||||
```
|
||||
|
||||
### 워터마크
|
||||
```python
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
img = Image.open('input.png')
|
||||
draw = ImageDraw.Draw(img)
|
||||
draw.text((10, 10), "Watermark", fill=(255, 255, 255, 128))
|
||||
img.save('output.png')
|
||||
```
|
||||
|
||||
### 포맷 변환
|
||||
```python
|
||||
img = Image.open('input.png')
|
||||
img.save('output.jpg', 'JPEG', quality=85)
|
||||
img.save('output.webp', 'WEBP', quality=80)
|
||||
```
|
||||
|
||||
### 배치 처리
|
||||
```python
|
||||
import glob
|
||||
for path in glob.glob('*.png'):
|
||||
img = Image.open(path)
|
||||
img.thumbnail((800, 800))
|
||||
img.save(f'resized_{path}')
|
||||
```
|
||||
|
||||
## 추가 기능
|
||||
- 회전/뒤집기 (rotate, transpose)
|
||||
- 밝기/대비/선명도 조절 (ImageEnhance)
|
||||
- 필터 적용 (ImageFilter: BLUR, SHARPEN, CONTOUR)
|
||||
- 이미지 합성 (Image.paste, Image.alpha_composite)
|
||||
- EXIF 정보 읽기
|
||||
|
||||
한국어로 안내하세요. 작업 폴더에 Python 스크립트와 결과 파일을 저장하세요.
|
||||
Reference in New Issue
Block a user