Personal tools
You are here: Home メンバー 菊地時夫 メモ Pythonでfavicon を作る
Document Actions

Pythonでfavicon を作る

by 菊地時夫 posted at 2007-09-21 15:56 last modified 2007-09-21 19:25

ブラウザの URL ボックスの最初に出てくる小さな画像。

16x16 であれば Windows ICON 形式でなくても、Firefox は表示してくれる。自分は Firefox しか使わない。なので、これでいいのだが。

ふと、IE 使用者のことを考えてしまった。IE では、これをデスクトップにドラッグ&ドロップすると、ウェブページへのショートカットアイコンになる。このとき、16x16 だとみっともない。

で、本当の(?) Windows ICON を作ってみることにした。

できたのが mkico.py

使い方は、

最初に、半透明も駆使して 48x48 アイコン画像の PNG ファイルを作成しておく。(どうやるかは、、、^_^)

あとは、Usage: のとおり。だが、カッコつけて英語なので、以下和語で。

使用法:mkico.py (オプション) PNGファイル名(アルファチャンネル必須)
オプション: -p, --palette ..... パレット8ビットアイコンを作る
          -f, --fullcolor ... フルカラー+アルファの 32ビットアイコンを作る
          -b, --both ........ 8,32ビット両方が入ったアイコンを作る
                  (アプリがどっちを表示するかは知らない)
          -n, --nomask ...... マスクを作成しない(全部 0)-f で有効
          --sizes=16,32,48 .. アイコンのサイズ(デフォルトは 16,32,48)

とっても参考になったサイト: http://www.martinreddy.net/gfx/2d/BMP.txt

PLI

Enjoy!

Category(s)
なんでも
The URL to Trackback this entry is:
http://sango.lab.tkikuchi.net/Members/tkikuchi/30e130e2/pythonfavicon-30924f5c308b/tbping
« December 2010 »
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
About this blog
メモ代わりのブログ
Recent entries
JIS を戻すって tkikuchi 2010-06-14
ゼネラリスト tkikuchi 2010-04-26
Solaris 10 で 64bit tkikuchi 2010-04-11
なんかマヌケ? tkikuchi 2010-02-22
Oracle + ASP.NET なんですね tkikuchi 2010-01-28
Recent comments
Re:lock できないので tkikuchi 2009-06-03
Re:挨拶用メモ tkikuchi 2009-05-27
Re:挨拶用メモ knakahasi 2009-05-04
Re:Xgrid (続編) tkikuchi 2008-10-09
PILでのグラフ出力 ytoshio 2008-03-06
Categories
なんでも
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: