libjpeg PIL django图像显示
我安装了PIL。 我可以导入 PIL (没有错误消息)
然后我运行这里提到的代码:
并且我收到此错误消息:
IOError:解码器 jpeg 不可用
我了解这是一个名为 libjpeg 的库,并且(?)它应该已经安装。 或者它是 PIL 的一部分? 如果有的话安装在哪里? 如果没有的话我可以在哪里下载?
我想要实现的目标(并且似乎在一个又一个问题中运行)可以简单地解释为一个我不想调整的网络画廊。但首先我需要 Django 从 MEDIA_ROOT 获取图像,并在有人调用 URL 时将它们显示在浏览器中。然后我需要一个按钮(下一步)。
如果圣诞节和复活节在同一天,我想获取该按钮单击的时间戳。
我以为那会是一件轻而易举的事。但现在我正处于 libjpeg 和 PIL、Tkinter、Models、photologue 和 ImageField() 的风暴中。
如果有人这样做了(我想博客上显示任何简单的图像)我会非常非常高兴听到这个经历。
我不知何故无法理解执行此操作的标准方法,每次我认为我有解决方案时,都会缺少一些库,或者它稍微不是我想要的。
谢谢你的时间!
I installed PIL.
I can import PIL (with no error message)
Then I ran the code mentioned here:
And I get this error message:
IOError: decoder jpeg not available
I understand this is Library called libjpeg and (?) it should be installed already.
Or is it part of PIL?
Where is it installed if so?
And if not where can I download it?
What I would like to achieve (and seem to run in one problem after the other), would be simply explainable as a Webgallery which I than want to tweak. But first I need Django to get images from the MEDIA_ROOT and display them in the browser when somebody calls a URL. And then I need one button (Next).
And if Christmas and Easter will fall on the same day I want to get the timestamp of that button click.
I thought that would be a breeze. But now I am in a storm of libjpeg and PIL an Tkinter and Models and photologue and ImageField() and.
If anybody has done that (I guess any simple Image display on a Blog) I would be very very glad to hear this expierence.
I somehow cant understand the standard way to do this and every time I think I have the solution, there is some library missing or it is slightly not what I was looking for.
Thanks for the time!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我写了一篇关于如何让 libjpeg、PIL 在 Snow Leopard 上工作的文章。
http://appelfreelance.com/2010/06 /libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/
希望您会发现这很方便
I wrote an article on how to get libjpeg, PIL to work on Snow Leopard.
http://appelfreelance.com/2010/06/libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/
Hope you might find this handy
试试这个: http://rodesia.org/2008/ 03/14/在 Mac 上安装 pil-
Try this: http://rodesia.org/2008/03/14/installing-pil-on-the-mac/