유틸리티 컴파일
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
사전 컴파일된 유틸리티가 요구사항에 맞지 않으면 WebP 유틸리티를 직접 빌드할 수 있습니다.
Visual C++로 Windows에서 컴파일
다운로드 목록에서 libwebp-1.6.0.tar.gz
를 다운로드하고 콘텐츠를 추출합니다.
libwebp-1.6.0
디렉터리에서 다음을 실행합니다.
nmake /f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output
추가 옵션을 보려면 다음을 실행하세요.
nmake /f Makefile.vc
output\release-static\x86\bin
또는 output\release-static\x64\bin
디렉터리에는 타겟팅된 플랫폼에 따라 cwebp.exe
및 dwebp.exe
도구가 포함됩니다. output\release-static\(x86|x64)\lib
디렉터리에는 libwebp
정적 라이브러리가 포함됩니다.
Linux
JPEG, PNG, TIFF, GIF, WebP 이미지 형식 간 변환에 필요한 libjpeg
, libpng
, libtiff
, libgif
패키지를 설치합니다.
패키지 관리는 Linux 배포판에 따라 다릅니다. Ubuntu 및 Debian에서는 다음 명령어를 실행하면 필요한 패키지가 설치됩니다.
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev
설치를 완료합니다 (아래 참고).
macOS
MacPorts는 종속 항목을 충족하는 편리한 방법입니다. MacPorts가 이미 설치되어 있다면 3단계로 바로 이동하세요. 아니라면 다음 단계를 따르세요.
MacPorts 다운로드 사이트에서 macOS 버전에 맞는 MacPorts를 다운로드합니다. MacPorts를 사용하려면 Xcode를 설치해야 합니다.
MacPorts 안내에 따라 MacPorts를 설치합니다.
MacPorts를 업데이트합니다.
sudo port selfupdate
JPEG, PNG, TIFF, GIF 종속 항목을 설치합니다.
sudo port install jpeg libpng tiff giflib
설치를 완료합니다 (아래 참고).
Cygwin
Cygwin 웹페이지에서 setup.exe를 다운로드합니다.
setup.exe를 실행하고 설치를 진행합니다.
패키지 선택 화면에서 사전 선택된 패키지에 다음을 추가합니다.
libjpeg-devel
, libpng-devel
, libtiff-devel
, libgif-devel
gcc
, make
, automake
(패키지 빌드용)
설치를 완료합니다 (아래 참고).
건물
다운로드 목록에서 libwebp-1.6.0.tar.gz
을 다운로드합니다.
패키지의 압축을 풀거나 압축을 해제합니다. 그러면 libwebp-1.6.0/
이라는 디렉터리가 생성됩니다.
tar xvzf libwebp-1.6.0.tar.gz
WebP 인코더 cwebp
및 디코더 dwebp
를 빌드합니다.
libwebp-1.6.0/
가 추출된 디렉터리로 이동하여 다음 명령어를 실행합니다.
cd libwebp-1.6.0
./configure
make
sudo make install
이렇게 하면 libwebp
라이브러리 (동적 및 정적)와 함께 cwebp
및 dwebp
명령줄 도구가 빌드되고 설치됩니다.
이러한 도구는 일반적으로 기본적으로 /usr/local/bin/
아래에 설치됩니다. 로컬 버전은 examples/
디렉터리 아래에 빌드됩니다.
라이브러리는 일반적으로 /usr/local/lib/
디렉터리에 설치됩니다.
런타임 오류를 방지하려면 LD_LIBRARY_PATH
환경 변수에 이 위치가 포함되어 있는지 확인하세요. C 헤더는 일반적으로 /usr/local/include/webp
아래에 설치됩니다.
추가 옵션을 보려면 다음을 실행하세요.
./configure --help
다음 단계
이미지 변환을 시작하는 방법을 알아보려면 WebP 사용으로 이동하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-08(UTC)
[null,null,["최종 업데이트: 2025-08-08(UTC)"],[[["\u003cp\u003eThis page provides instructions for building WebP utilities (\u003ccode\u003ecwebp\u003c/code\u003e and \u003ccode\u003edwebp\u003c/code\u003e) from source code if precompiled options are unsuitable.\u003c/p\u003e\n"],["\u003cp\u003eBuilding on Windows involves using Visual C++ with specific commands to compile the utilities and library.\u003c/p\u003e\n"],["\u003cp\u003eFor Unix-like platforms (Linux, macOS, Cygwin), instructions cover installing necessary dependencies before building the WebP tools.\u003c/p\u003e\n"],["\u003cp\u003eThe building process on Unix-like systems involves downloading the source code, configuring, compiling, and installing the utilities and libraries.\u003c/p\u003e\n"],["\u003cp\u003eAfter building the utilities, users can proceed to the "Using WebP" page for image conversion instructions.\u003c/p\u003e\n"]]],["To build WebP utilities: Windows users download `libwebp-1.5.0.tar.gz`, then use `nmake` in the `libwebp-1.5.0` directory to compile, producing `cwebp.exe` and `dwebp.exe` in the output. Unix-like users install `libjpeg`, `libpng`, `libtiff`, and `libgif` packages, then download and extract `libwebp-1.5.0.tar.gz`. Navigate to the directory and run `./configure`, `make`, and `sudo make install` to build and install `cwebp` and `dwebp`.\n"],null,["# Compiling the Utilities\n\nIf the [precompiled utilities](/speed/webp/docs/precompiled) don't suit your\nneeds, you can build the WebP utilities yourself.\n\nCompiling on Windows with Visual C++\n------------------------------------\n\n1. Download `libwebp-1.6.0.tar.gz` from the [downloads list](https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html)\n and extract its contents.\n\n2. From the `libwebp-1.6.0` directory, run:\n\n nmake /f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output\n\n To see additional options, run: \n\n nmake /f Makefile.vc\n\n3. The directory `output\\release-static\\x86\\bin` or\n `output\\release-static\\x64\\bin` will contain the tools `cwebp.exe` and\n `dwebp.exe` depending on the platform being targeted. The directory\n `output\\release-static\\(x86|x64)\\lib` will contain the `libwebp` static\n library.\n\nCompiling on Unix-like Platforms\n--------------------------------\n\n### Preparing the Platform\n\n#### Linux\n\n1. Install the `libjpeg`, `libpng`, `libtiff` and `libgif` packages, needed to\n convert between JPEG, PNG, TIFF, GIF and WebP image formats.\n\n Package management varies by Linux distribution. On Ubuntu and Debian, the\n following command will install the needed packages: \n\n sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev\n\n2. Complete the installation ([see below](#building)).\n\n#### macOS\n\nMacPorts is a convenient way to satisfy dependencies. If you already have\nMacPorts installed, go directly to Step 3. Otherwise, follow these steps:\n\n1. Download MacPorts for your macOS version from the MacPorts\n [downloads site](https://distfiles.macports.org/MacPorts). MacPorts requires\n the installation of\n [Xcode](https://developer.apple.com/xcode/).\n\n2. Install MacPorts following the MacPorts\n [directions](https://guide.macports.org/).\n\n3. Update MacPorts:\n\n sudo port selfupdate\n\n4. Install the JPEG, PNG, TIFF and GIF dependencies:\n\n sudo port install jpeg libpng tiff giflib\n\n5. Complete the installation ([see below](#building)).\n\n#### Cygwin\n\n1. Download setup.exe from the [Cygwin web page](https://www.cygwin.com).\n\n2. Run setup.exe and proceed through the installation.\n\n3. At the **Select Packages** screen, add to the pre-selected packages the\n following:\n\n - `libjpeg-devel`, `libpng-devel`, `libtiff-devel` and `libgif-devel`\n\n - `gcc`, `make` and `automake` (for building packages)\n\n4. Complete the installation ([see below](#building)).\n\n### Building\n\n1. Download `libwebp-1.6.0.tar.gz` from the\n [downloads list](https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html).\n\n2. Untar or unzip the package. This creates a directory named `libwebp-1.6.0/`:\n\n tar xvzf libwebp-1.6.0.tar.gz\n\n3. Build WebP encoder `cwebp` and decoder `dwebp`:\n\n Go to the directory where `libwebp-1.6.0/` was extracted to\n and run the following commands: \n\n cd libwebp-1.6.0\n ./configure\n make\n sudo make install\n\n This builds and installs the `cwebp` and `dwebp` command line tools, along\n with the `libwebp` libraries (dynamic and static).\n\n These tools are usually installed under `/usr/local/bin/` by default. The\n local versions are built under the `examples/` directory.\n\n The library will usually be installed under the `/usr/local/lib/` directory.\n To avoid run-time errors, make sure that your `LD_LIBRARY_PATH` environment\n variable includes this location. The C headers are typically installed under\n `/usr/local/include/webp`.\n\n To see additional options, run: \n\n ./configure --help\n\nWhat Next?\n----------\n\nGo to [Using WebP](/speed/webp/docs/using) for instructions on how to start\nconverting your images."]]