11
11

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.

Chrome Extension のアイコン複数サイズ作るの面倒くさい

Posted at

Let's 自動化! ビバシェルスクリプト!!

このシェルスクリプトは ./icons/source.png から ./icons/16.png, ./icons/46.png, ./icons/128.pngの3つのアイコンを生成します。
このスクリプトを実行するには ImageMagick が必要です。

unsharpは綺麗にするオプションです。調べてもよくわからないのですが…。

generate_icons.sh
#!/bin/bash

for size in 16 48 128
do
  convert icons/source.png -resize ${size}x  -unsharp 1.5x1+0.7+0.02 icons/${size}.png
done

manifestはこんな感じですかね。

manifest.json_(iconのみ抜粋)
{
  "icons": {
    "16": "icons/16.png",
    "48": "icons/48.png",
    "128": "icons/128.png"
  }
}
11
11
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
11
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?