zoukankan      html  css  js  c++  java
  • python PIL下的各种问题

    为了实现验证码的功能,使用了PIL。结果出现各种问题:

    先是"ImportError: The _imagingft C module is not installed",google了很长时间,在公司windows下不知怎么卸载又安装PIL居然好了,但却不知道到底怎么回事,稀里糊涂的验证码就可以出来了。晚上在家里ubuntu下,搞了很长时间终于算是弄好了。

    最终的解决方案还是,不用PIL了。使用pillow。同时解决了“ioerror encoder zip not available”

    pillow的使用方式有所变化:

    Pillow is a fork of PIL that is compatible with pip/setuptools and gets a little better maintenance. I haven't seen any API differences yet.
    
    Edit: There is one notable API difference. PIL exposes Image as a top-level namespace, so you can
    
    import Image # in PIL only
    
    but
    
    from PIL import Image  # in pillow or PIL

    参考自:http://stackoverflow.com/questions/3544155/about-the-pil-error-ioerror-decoder-zip-not-available

  • 相关阅读:
    cocos2dx 动画控制概要
    lua与C交互 具体
    lua与C/C++交互概要
    3D图像算法
    lua 语言笔记
    iostransitiontranslate闪屏问题总结
    document.onreadystatechange()来判断页面加载完
    JavaScript装逼指南
    box-shadow 阴影
    web小技巧
  • 原文地址:https://www.cnblogs.com/zeng-wei/p/3710463.html
Copyright © 2011-2022 走看看