img2webp
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이름
img2webp
: 입력 이미지의 시퀀스에서 애니메이션 WebP 파일을 만듭니다.
개요
img2webp [file_options] [[frame_options] frame_file]...
img2webp argument_file_name
설명
img2webp
는 애니메이션 WebP 형식을 사용하여 일련의 이미지를 압축합니다. 입력 이미지는 PNG, JPEG, TIFF 또는 WebP일 수 있습니다. 단일 파일 이름('-' 문자로 시작하지 않음)이 인수로 제공되면 명령줄 인수가 실제로 이 파일에서 토큰화됩니다. 이렇게 하면 간편하게 스크립트를 작성하거나 많은 수의 인수를 사용할 수 있습니다.
파일 수준 옵션
파일 수준 옵션은 입력 프레임이 읽히기 전에 압축 프로세스 시작 시 적용됩니다.
-o string
- 출력 WebP 파일의 이름을 지정합니다.
-min_size
- 이미지를 인코딩하여 가장 작은 크기를 달성합니다. 이렇게 하면 키 프레임 삽입이 사용 중지되고 각 프레임의 출력이 가장 작은 매개변수가 선택됩니다. 기본적으로 무손실 압축을 사용하지만
-q
, -m
, -lossy
또는 -mixed
옵션과 결합할 수 있습니다.
-kmin int
-kmax int
- 출력 애니메이션에서 연속 키프레임(독립적으로 디코딩 가능한 프레임) 사이의 최소 및 최대 거리를 지정합니다. 이 기준이 충족되도록 도구는 필요에 따라 출력 애니메이션에 일부 키 프레임을 삽입합니다.
-mixed
- 혼합 압축 모드: 각 프레임에 대해 손실이 있는 압축 또는 무손실 압축을 휴리스틱 방식으로 선택하여 이미지 압축을 최적화합니다. 이 전역 옵션은 로컬 옵션
-lossy
및 -lossless
를 사용 중지합니다.
-near_lossless int
- 무손실에 가까운 이미지 사전 처리 수준을 지정합니다. 이 옵션은 압축성을 높이기 위해 픽셀 값을 조정하지만 시각적 품질에는 최소한의 영향을 미칩니다. 무손실 압축 모드를 자동으로 트리거합니다. 범위는 0(최대 사전 처리)~100 (사전 처리 없음, 기본값)입니다. 일반적인 값은 약 60입니다.
-q 100
를 사용한 손실은 경우에 따라 더 나은 결과를 얻을 수 있습니다.
-sharp_yuv
- 더 정확하고 선명한 RGB->YUV 변환을 사용합니다. 이 프로세스는 기본 '빠른' RGB->YUV 변환보다 느립니다.
-loop int
- 애니메이션이 반복되어야 하는 횟수를 지정합니다.
0
를 사용하면 '무한 루프'가 됩니다.
-v
- 상세하게 설명합니다.
-h, -help
- 사용에 관한 간단한 요약입니다.
-version
- 사용된 관련 라이브러리의 버전 번호를 출력합니다.
프레임별 옵션
프레임별 옵션은 명령줄에서 인수로 뒤에 오는 이미지에 적용됩니다. 각 특정 입력 이미지 전에 여러 번 수정할 수 있습니다.
-d int
- 이미지 길이(밀리초)를 지정합니다.
-lossless, -lossy
- 무손실 또는 손실 압축 모드를 사용하여 다음 이미지를 압축합니다. 기본 모드는 무손실입니다.
-q float
- 0과 100 사이의 압축 계수를 지정합니다. 기본값은 75입니다.
-m int
- 사용할 압축 방법을 지정합니다. 이 매개변수는 인코딩 속도와 압축된 파일 크기 및 품질 간의 균형을 제어합니다. 가능한 값의 범위는 0~6입니다. 기본값은 4입니다. 더 높은 값을 사용하면 인코더가 추가 인코딩 가능성을 검사하고 품질 향상을 결정하는 데 더 많은 시간을 할애합니다. 값이 낮을수록 처리 시간이 단축되지만 파일 크기가 커지고 압축 품질이 저하될 수 있습니다.
버그
예
img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp
저자
img2webp
는 libwebp
의 일부이며 WebP팀에서 작성했습니다. 최신 소스 트리는 https://chromium.googlesource.com/webm/libwebp에서 확인할 수 있습니다.
이 매뉴얼 페이지는 패스칼 마시미노 pascal.massimino@gmail.com가 Debian 프로젝트를 위해 작성했으며 다른 사용자가 사용할 수도 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-08(UTC)
[null,null,["최종 업데이트: 2025-08-08(UTC)"],[[["\u003cp\u003e\u003ccode\u003eimg2webp\u003c/code\u003e is a command-line tool that creates animated WebP files from a sequence of PNG, JPEG, TIFF, or WebP images.\u003c/p\u003e\n"],["\u003cp\u003eIt offers various options for controlling compression, loop behavior, key frame insertion, and image quality.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify file-level options that apply to the entire animation and per-frame options for individual images.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eimg2webp\u003c/code\u003e supports both lossy and lossless compression modes and allows fine-tuning of compression parameters for optimal file size and quality.\u003c/p\u003e\n"],["\u003cp\u003eDetailed usage instructions, including options and examples, are provided in the documentation.\u003c/p\u003e\n"]]],["`img2webp` creates animated WebP files from image sequences (PNG, JPEG, TIFF, WebP). Key actions include setting file-level options like output filename (`-o`), minimum size (`-min_size`), keyframe distances (`-kmin`, `-kmax`), compression mode (`-mixed`, `-near_lossless`, `-sharp_yuv`), and loop count (`-loop`). Per-frame options include duration (`-d`), compression type (`-lossless`, `-lossy`), quality (`-q`), and method (`-m`). You can report bugs or submit patches at the provided links.\n"],null,["# img2webp\n\nName\n----\n\n`img2webp` -- Create animated WebP file from a sequence of input images.\n\nSynopsis\n--------\n\n`img2webp [file_options] [[frame_options] frame_file]...` \n\n`img2webp argument_file_name`\n\nDescription\n-----------\n\n`img2webp` compresses a sequence of images using the animated WebP format. Input\nimages can either be PNG, JPEG, TIFF or WebP. If a single file name (not\nstarting with the character '-') is supplied as the argument, the command line\narguments are actually tokenized from this file. This allows for easy scripting\nor using a large number of arguments.\n\nFile-level Options\n------------------\n\nThe file-level options are applied at the beginning of the compression process,\nbefore the input frames are read.\n\n`-o string`\n: Specify the name of the output WebP file.\n\n`-min_size`\n: Encode images to achieve smallest size. This disables key frame insertion\n and picks the parameters resulting in the smallest output for each frame. It\n uses lossless compression by default, but can be combined with `-q`, `-m`,\n `-lossy` or `-mixed` options.\n\n`-kmin int` \n`-kmax int`\n: Specify the minimum and maximum distance between consecutive key frames\n (independently decodable frames) in the output animation. The tool will\n insert some key frames into the output animation as needed so that this\n criteria is satisfied.\n\n`-mixed`\n: Mixed compression mode: optimize compression of the image by picking either\n lossy or lossless compression for each frame heuristically. This global\n option disables the local option `-lossy` and `-lossless`.\n\n`-near_lossless int`\n: Specify the level of near-lossless image preprocessing. This option adjusts\n pixel values to help compressibility, but has minimal impact on the visual\n quality. It triggers lossless compression mode automatically. The range is 0\n (maximum preprocessing) to 100 (no preprocessing, the default). The typical\n value is around 60. Note that lossy with `-q 100` can at times yield better\n results.\n\n`-sharp_yuv`\n: Use more accurate and sharper RGB-\\\u003eYUV conversion. Note that this process is\n slower than the default 'fast' RGB-\\\u003eYUV conversion.\n\n`-loop int`\n: Specifies the number of times the animation should loop. Using `0` means\n 'loop indefinitely'.\n\n`-v`\n: Be more verbose.\n\n`-h, -help`\n: A short usage summary.\n\n`-version`\n: Print the version numbers of the relevant libraries used.\n\nPer-frame Options\n-----------------\n\nThe per-frame options are applied for the images following as arguments in the\ncommand line. They can be modified any number of times preceding each particular\ninput image.\n\n`-d int`\n: Specify the image duration in milliseconds.\n\n`-lossless, -lossy`\n: Compress the next image(s) using lossless or lossy compression mode. The\n default mode is lossless.\n\n`-q float`\n: Specify the compression factor between 0 and 100. The default is 75.\n\n`-m int`\n: Specify the compression method to use. This parameter controls the trade off\n between encoding speed and the compressed file size and quality. Possible\n values range from 0 to 6. Default value is 4. When higher values are used,\n the encoder will spend more time inspecting additional encoding\n possibilities and decide on the quality gain. Lower value can result in\n faster processing time at the expense of larger file size and lower\n compression quality.\n\nBugs\n----\n\n- Please report all bugs to the issue tracker: \u003chttps://issues.webmproject.org\u003e\n\n- Patches welcome! See this page to get started: \u003chttps://www.webmproject.org/code/contribute/submitting-patches/\u003e\n\nExample\n-------\n\n img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp\n\nAuthors\n-------\n\n`img2webp` is a part of `libwebp` and was written by the WebP team. The latest\nsource tree is available at \u003chttps://chromium.googlesource.com/webm/libwebp\u003e\n\nThis manual page was written by Pascal Massimino [pascal.massimino@gmail.com](mailto:pascal.massimino@gmail.com)\nfor the Debian project (and may be used by others)."]]