How to use the Python Imaging Library
21–30 of 34 posts
Re: How to use the Python Imaging Library
#22Re: How to use the Python Imaging Library
#23Unreadable in mobile safari. The text is jammed into one skinny column that's so tiny it can't even word wrap effectively. It breaks lines in the middle of words. How and why do people keep going out of their way to make websites unreadable on phones?
One hardly needs to go out of their way to make a page unreadable in one browser. Developing proper CSS to support cross-browser, mobile-friendly websites to this day still isn't common knowledge for all developers. And it's almost impossible for most people to test their site across different mobile platforms themselves. For example, this website looks fine on my Windows phone. I'd have no idea his website had an is…
Re: How to use the Python Imaging Library
#24Earlier quoted context omitted.
I tried to install PIL the other day via `pip` I believe, and a warning appeared basically saying PIL is not being maintained (is dead), use an alternative.
PIL has never worked with pip, but you can still install it using the instructions on their web site. pillow works fine with pip.
Re: How to use the Python Imaging Library
#25Earlier quoted context omitted.
Is it planned for Pillow to support RAW formats?
No one's asked for it that I've heard, so it's not in the plans. I'd consider adding DNG if there's a good external library. The individual camera raws, that's more of a thankless task with how fast they change/multiply.
When I got a D800 around launch time, even Lightroom didn't have the capability to import them directly at launch and I had to convert them to DNGs first. What a bloddy mess.
Re: How to use the Python Imaging Library
#26Earlier quoted context omitted.
No one's asked for it that I've heard, so it's not in the plans. I'd consider adding DNG if there's a good external library. The individual camera raws, that's more of a thankless task with how fast they change/multiply.
Not directed at you, but why do camera makers continue to reinvent RAW formats for new models? Isn't this a 'solved' problem with Adobe's DNG being royalty free and all? When I got a D800 around launch time, even Lightroom didn't have the capability to import them directly at launch and I had to convert them to DNGs first. What a bloddy mess.
But once you have that file format, camera manufacturers tend to embed hunks of data in the raw file about settings and other things that the camera knows about the image, like the focus points, white balance, camera calibration, image compression, dot layout and all that.
I'd like to leave that as Someone Else's Problem. (unless there's a lot of money and shiny cameras in it for me)
Re: How to use the Python Imaging Library
#27I've been using it recently and needed a bit more industrial strength and speed than the library provides. PIL supports converting an image to/from a NUMPY array! (And the execution speed difference is definitely worth the effort...)
Now my template for a new PIL script looks like this (all error checking removed for simplicity):
from PIL import Image
import numpy as np
im = Image.open(args.input)
rgb8 = np.array(im)[...,:3]
rgb = rgb8.astype('float') / 256.
# ... do stuff to 'rgb' using np
rgb8 = np.clip(rgb * 256., 0, 255).astype('uint8')
im = Image.fromarray(rgb8)
im.save(args.output)
Re: How to use the Python Imaging Library
#28Earlier quoted context omitted.
PIL has never worked with pip, but you can still install it using the instructions on their web site. pillow works fine with pip.
I'm curious what problems you faced with PIL on Pip. I never tried installing it before today at work on Travis using Pip. Despite of all system libraries (jpeg-dev, zlib-dev) installed it would complain about libraries not being present and compiled without png/jpeg... support.
Re: How to use the Python Imaging Library
#29Earlier quoted context omitted.
Is it planned for Pillow to support RAW formats?
No one's asked for it that I've heard, so it's not in the plans. I'd consider adding DNG if there's a good external library. The individual camera raws, that's more of a thankless task with how fast they change/multiply.
Can you guys just call OS libraries? There are RAW librarys available for Windows and OS X. A thin wrapper would be nice. I really hate to compile >20MB external shared libraries myself.
Re: How to use the Python Imaging Library
#30Earlier quoted context omitted.
Not directed at you, but why do camera makers continue to reinvent RAW formats for new models? Isn't this a 'solved' problem with Adobe's DNG being royalty free and all? When I got a D800 around launch time, even Lightroom didn't have the capability to import them directly at launch and I had to convert them to DNGs first. What a bloddy mess.
There are many rants about that. It's not so much that the formats change, it's that they keep adding tags that mean something within the formats. Oddly enough, of the ones that I've looked at, they can (generally) be interpreted as a tiff file if you squint at them correctly. (not that a tiff file is any better. It's not called Thousands of Incompatible File Formats for nothing). But once you have that file format,…