1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Mac】コマンドでAVIFをPNGなどに変換する方法

Posted at

libavifをインストール

Homebrewを使用してlibavifをインストールします。

brew install libavif

avifdecコマンドを使用して画像を変換

avifdec input.png output.avif

スクリーンショット 2024-09-15 23.41.51.png

avifdecコマンドで使用できるオプションの詳細は以下のとおりです。

$ avifdec --help
Syntax: avifdec [options] input.avif output.[jpg|jpeg|png|y4m]
        avifdec --info    input.avif
Options:
    -h,--help         : Show syntax help
    -V,--version      : Show the version number
    -j,--jobs J       : Number of jobs (worker threads). Use "all" to potentially use as many cores as possible (default: all)
    -c,--codec C      : Codec to use (choose from versions list below)
    -d,--depth D      : Output depth [8,16]. (PNG only; For y4m, depth is retained, and JPEG is always 8bpc)
    -q,--quality Q    : Output quality [0-100]. (JPEG only, default: 90)
    --png-compress L  : Set PNG compression level (PNG only; 0-9, 0=none, 9=max). Defaults to libpng's builtin default.
    -u,--upsampling U : Chroma upsampling (for 420/422). automatic (default), fastest, best, nearest, or bilinear
    -r,--raw-color    : Output raw RGB values instead of multiplying by alpha when saving to opaque formats
                        (JPEG only; not applicable to y4m)
    --index I         : When decoding an image sequence or progressive image, specify which frame index to decode (Default: 0)
    --progressive     : Enable progressive AVIF processing. If a progressive image is encountered and --progressive is passed,
                        avifdec will use --index to choose which layer to decode (in progressive order).
    --no-strict       : Disable strict decoding, which disables strict validation checks and errors
    -i,--info         : Decode all frames and display all image information instead of saving to disk
    --icc FILENAME    : Provide an ICC profile payload (implies --ignore-icc)
    --ignore-icc      : If the input file contains an embedded ICC profile, ignore it (no-op if absent)
    --size-limit C    : Specifies the image size limit (in total pixels) that should be tolerated.
                        Default: 268435456, set to a smaller value to further restrict.
  --dimension-limit C : Specifies the image dimension limit (width or height) that should be tolerated.
                        Default: 32768, set to 0 to ignore.
    --                : Signals the end of options. Everything after this is interpreted as file names.

Version: 1.1.1 (aom [enc/dec]:3.10.0)
libyuv : unavailable
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?