반응형
출처 : http://okjungsoo.tistory.com/entry/ImageMagick-%EB%AA%85%EB%A0%B9%EC%96%B4
netpbm
http://netpbm.sourceforge.net/ 윈도용 netpbmFabrice Popineau 씨가 포팅한 것을 쓸 수 있습니다. http://ftp.ktug.or.kr/mirrors/fptex/
convert
http://ftp.ktug.or.kr/mirrors/ImageMagick/. 이 파일은 ImageMagick의 일부입니다.
jpeg2ps
http://www.pdflib.com/jpeg2ps/index.html. fpTEX 등에 포함되어 있는 유틸리티일 것입니다.


ImageMagick - GPL 라이센스, 이미지 타입변환, 크롭, 등등등 다양한 기능을 제공하고 있는 이미지 프로세싱 프로그램입니다. Command-line에서 실행할 수 있는 프로그램으로 다음과 같은 명령어들이 있습니다.

  • animate: animates an image sequence on any X server.
  • compare: mathematically and visually annotate the difference between an image and its reconstruction.
  • composite: overlaps one image over another.
  • conjure: interprets and executes scripts written in the Magick Scripting Language (MSL).
  • convert: 이미지의 포멧변환부터 크기조절, 썸네일, 필터링, 블루어(Blur), 크롭(Crop), 디더링(Dither), 그리기(Draw on), 이미지 합치기, GIF 프레임 처리 등등의 다양한 변환 작업을 (옵션을 사용하여 지정) 실행합니다.
  • display: displays an image or image sequence on any X server.
  • identify: 이미지 파일(들)의 포멧 또는 이미지 정보들을 표시해줍니다.
  • import: saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
  • mogrify: resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert writes to a different image file.
  • montage: create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.
  • stream: a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components.

이러한 명령어들과 명령어의 다양한 옵션(명령어를 클릭해서 들어가면 옵션을 보실 수 있습니다. )들로 이미지에 여러가지 효과를 줄 수가 있습니다.

Command line에서 실행은 명령어, 원본파일, 옵션명(옵션 값이 있으면 옵션 값을 같이 사용합니다.), 결과파일순으로 명령어를 입력한 후 실행시키면 됩니다.

C:\> convert src.gif -layers flatten dst.gif

위의 명령어는 움직이는 gif파일의 깜박임을 제거해주는 명령입니다.

관련링크 및 참고자료

※ 허접 포스팅입니다. ImageMagick 사용하기 위한 메모로 작성한 것이니 참고해주세요. -_-;;;

P.S.1. ImageMagick을 윈도우에서 설치할 때 Download로 들어가서 ImageMagick 외의 사이트에서 다운로드 받는 경우 바이너리 설치버전을 찾을 수 없더군요. 바이너리가 아닌 경우에는 컴파일해서 설치해야하는 복잡한 과정이 필요합니다.

P.S.2. php에서 exec()를 사용하여서 ImageMagick을 실행하는 경우, 세 번째 인자로 실행결과 값을 얻어올 수가 있습니다. 저의 경우 바이너리를 설치하고 바로 실행하였는데, 4가 리턴되면서 동작을 하지 않더군요. 고민 끝에 재부팅(!)을 하자 정상적으로 동작하더군요. -_-;;;;;

반응형

'Tip & Tech.' 카테고리의 다른 글

Windows 7 새로운 단축키  (0) 2009.08.20
NVIDIA의 신기한 기능.  (2) 2009.07.28
ShellExtension 이미지 미리보기/변환 프로그램  (0) 2009.07.27
Posted by Real_G