56
42

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

コマンド一発で透過 png を綺麗に非透過 png にする

Last updated at Posted at 2013-03-22

スタンダードな方法

convert HOGE.PNG -background white -alpha deactivate -flatten PIYO.PNG

これだと,ギザギザになって汚い.半透明が無視されるからである.

綺麗な方法

convert HOGE.PNG  \( +clone -alpha opaque -fill white -colorize 100% \) +swap -geometry +0+0 -compose Over -composite -alpha off PIYO.png

これで,綺麗になる.

56
42
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
56
42

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?