

这里使用到了PythonMagick模块,关于PythonMagick模块和ImageMagick的详细信息请参考:http://www.imagemagick.org/。
下面这段代码可以讲jpg图片转换成ico图标格式。
# -*- coding: utf-8 -*-
import PythonMagick
img = PythonMagick.Image("c:/1.jpg")
img.sample('128x128')
img.write('c:/1.ico')希望本文所述对大家的Python程序设计有所帮助。
