Skip to main content

Posts

Showing posts with the label jpeg

Python converting PDF to Image

I have a task to generate thumbnails of uploaded PDF's. And seems like there no really solid decisions yet. Just garbage on the surface in google results. after googling for a while I found out about many ways to do so. E.g. use python stdin/out to run external command line tool. It might work for you to. But it seemed not so pythonic for me. So I have searched fo better decision. My current is for now to install ImageMagick and MagicWand binding. Install ImageMagick. I have used PIL a while ago to work with images. But it made me cry, before I have met sorl-thumbnails. It helped me a lot. But now I have to deal with PDF's. And ImageMagick seems like a complete decision to master it all.  It has to convert pdf to my direct desirables - jpeg. So to install ImageMagick I have used brew. Like this: brew install imagemagick However there are many other ways to do so , depending on a platform. But I strongly recommend to look at brew . Anyway installing I...

Django: Instalation of Dev environment on a clear Lion Mac OS X

Like lots of Apple fans around the world I've finally decided to upgrade my OS to Lion release. I have bought a new laptop and it was the case. I've waited for a weekend to prepared myself for sex. And it was it. Now I want to share my experience with you guys. For you not to spend to much time on those issues, I've did. Anyway what I'm usually using is a Fresh 2.7 Python , Django , PIL , virtualenv and many many minor tools which exceed scopes of this article. I also use Eclipse IDE for Python Dev. So all this I had to install and make spinning till monday. If anybody tells me that Macs do not have good tools for this. He will not be right. Maybe there some itches and scratches of head about: "Why is not those things working" or "Why do they work not as preferred". But there always is a good "Googled" decision to handle that. Anyway lets go to installing stuff. Short brief Plan of out work: 1. Install Apple Development SDK + ...