下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。
内存溢出小编现在分享给大家,也给大家做个参考。
# rotate an image counter-clockwise using the PIL image library# free from: http://www.pythonware.com/products/pil/index.htm# make sure to install PIL after your regular python package is installedimport Image# open an image file (.bmp,.jpg,.png,.gif)# change image filename to something you have in the working folderim1 = Image.open("Donald.gif")# rotate 60 degrees counter-clockwiseim2 = im1.rotate(60)# brings up the modifIEd image in a vIEwer,simply saves the image as# a bitmap to a temporary file and calls vIEwer associated with .bmp# make certain you have an image vIEwer associated with this file typeim2.show()# save the rotated image as d.gif to the working folder# you can save in several different image formats,try d.jpg or d.png # PIL is pretty powerful stuff and figures it out from the extensionim2.save("d.gif")
以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
总结以上是内存溢出为你收集整理的python旋转图片的代码全部内容,希望文章能够帮你解决python旋转图片的代码所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)