備忘録:ATEM Mini用のプリマルチプライ処理された透過PNGを作成(変換)する方法 / How to create (convert) a pre-multiplied transparent PNG for ATEM Mini

      備忘録:ATEM Mini用のプリマルチプライ処理された透過PNGを作成(変換)する方法 / How to create (convert) a pre-multiplied transparent PNG for ATEM Mini はコメントを受け付けていません

個人的な備忘録です。
There is an English version of the article. Please scroll down the screen.

Blackmagic社のATEM Miniシリーズで、透過PNG画像を扱う時には、次の3つの方法があります。

  1. Photoshop用の専用プラグインから画像を書き出す(Pre Multiply Alphaオプションを有効にする)。
  2. 通常の透過PNGとして書き出し、ATEM Software Controlの「プリマルチプライキー」の項目でクリップ = 49.0%、ゲイン = 12.0%に設定する(これできれいに表示されない時は画像ごとに最適な値を設定する)。
  3. 通常の透過PNGを「プリマルチプライ(Premultiply)」処理された透過PNGファイルに変換する。

ここでは、上記 3. の方法について解説します。変換には「ImageMagick」というコマンドラインツールが必要です。インストール方法などは検索して調べてください。

ImageMagickツールをインストールすると「convert」という画像変換コマンドが使えるようになります。そこで、次のようなコマンドを実行します。in.pngは元の画像ファイル名、out.pngは変換後の画像ファイル名です。in.pngはコマンドの中に2回出てきますので注意してください。

convert “in.png” -background black -alpha Remove “in.png” -compose Copy_Opacity -composite “out.png”

バッチファイルなどを使ってフォルダ内の画像を全て変換できるようにしておくと便利です。

ちなみに、プリマルチプライ処理とは、透過部分に黒色を乗算する処理のようです。プリマルチプライ処理されたPNGファイルを画像表示ソフトなどで表示すると、透過部分が灰色〜黒色っぽく見えます。Affinity Photoなどの画像編集ソフトを使って手動で同じ処理を行うこともできます。

There are three ways to use transparent PNG images in Blackmagic’s ATEM Mini series.

  1. Export the image from a dedicated plug-in for Photoshop (with the Pre Multiply Alpha option enabled).
  2. Export the image as a normal transparent PNG, and set Clip = 49.0% and Gain = 12.0% in the Pre Multiply Key section of the ATEM Software Control (if this doesn’t work, set the best value for each image).
  3. Convert the normal transparent PNG to a “Premultiply” processed transparent PNG file.

In this page, I will explain third method above. You will need a command line tool “ImageMagick”. Please search and find out how to install it.

Once you have installed the ImageMagick tool, you can use an image conversion command called “convert”. Note that “in.png” appears twice in the command below.

convert “in.png” -background black -alpha Remove “in.png” -compose Copy_Opacity -composite “out.png”

It is useful to use a batch file or something similar to convert all the images in a folder.

By the way, pre-multiply processing seems to be the process of multiplying transparent areas by black color. When you view a pre-multiplied PNG file with image display software, the transparent areas will look gray to black. You can do the same processing manually with applications like Affinity Photos.

参考 / Reference