PyGTK里取得一个xpm图标的灰度图

最近用PyMaemo写一个N800上跑的程序时用到的:

  1. self.mote_pixbuf = gtk.gdk.pixbuf_new_from_xpm_data(MOTE_PIXMAP)
  2. self.mote_gray_pixbuf = self.mote_pixbuf.copy()
  3. self.mote_pixbuf.saturate_and_pixelate(self.mote_gray_pixbuf, 0.0, True)

colored

grayed

0 Responses to “PyGTK里取得一个xpm图标的灰度图”


  1. No Comments

Leave a Reply