Python, PIL and JPEG on Heroku

后端 未结 2 1502
余生分开走
余生分开走 2021-02-05 15:07

I have a Django site, hosted on Heroku. One of the models has an image field, that takes uploaded images, resizes them, and pushes them to Ama

相关标签:
2条回答
  • 2021-02-05 15:33

    I use this PIL fork in requirements.txt:

    -e hg+https://bitbucket.org/etienned/pil-2009-raclette/#egg=PIL
    

    and can use JPEG without issues:

           --------------------------------------------------------------------
           PIL 1.2a0 SETUP SUMMARY
           --------------------------------------------------------------------
           version       1.2a0
           platform      Python 2.7.2 (default, Oct 31 2011, 16:22:04)
                         [GCC 4.4.3] on linux2
           --------------------------------------------------------------------
           *** TKINTER support not available
           --- JPEG support available
           *** WEBP support not available
           --- ZLIB (PNG/ZIP) support available
           --- FREETYPE2 support available
           --- LITTLECMS support available
           --------------------------------------------------------------------
    
    0 讨论(0)
  • 2021-02-05 15:53

    Also please consider using Pillow, the "friendly" PIL fork which offers:

    • Setuptools compatibility
    • Python 3 compatibility
    • Frequent release cycle
    • Many bug fixes
    0 讨论(0)
提交回复
热议问题