Python USES PythonMagick to convert JPG images into ico images
- 2020-04-02 14:42:32
- OfStack
This article illustrates how python USES PythonMagick to convert JPG images into ico images. Share with you for your reference. Specific analysis is as follows:
Is used here to PythonMagick module, detailed information about the PythonMagick module and ImageMagick refer to: http://www.imagemagick.org/.
The following code can be used to convert JPG images to ico icon format.
# -*- coding: utf-8 -*-
import PythonMagick
img = PythonMagick.Image("c:/1.jpg")
img.sample('128x128')
img.write('c:/1.ico')
I hope this article has helped you with your Python programming.