convert 명령으로 이미지 편집 예제 몇가지
리눅스/OS 일반2015. 1. 16. 16:56
반응형
우선 편집 도구를 설치 합니다.
# apt -y install imagemagick
1. 사이즈 변경
# convert input.png -resize 256x256 output.png
2. 원형 이미지로 변경
정사각형 이미지를 동그라미 형태로 변경 (네 귀퉁이 바깥쪽은 투명처리)
원형 마스크 PNG를 먼저 만들고 합성합니다.
예시는 512x512 크기의 이미지를 원형으로 만들때 값입니다.
# convert -size 512x512 xc:none \
-fill white \
-draw "circle 256,256 256,1" \
mask.png
# convert input.png mask.png \
-alpha off -compose CopyOpacity -composite \
output.png
반응형
'리눅스 > OS 일반' 카테고리의 다른 글
| CentOS 에서 grub 부트매니저 복구 (0) | 2015.01.27 |
|---|---|
| 시스템 이상시 복구 모드 사용법 (rescue mode) (0) | 2015.01.27 |
| ip_conntrack: table full, dropping packet. (0) | 2015.01.16 |
| error cannot retrieve metalink for repository epel. please verify its path and try again (0) | 2014.12.31 |
| 우분투에 설치한 VirtualBox의 게스트 OS가 USB를 인식하지 못할 때 (0) | 2014.12.31 |
댓글()







