imaging

3D *.stl surface model convert to 2D image stack?

3D *.stl surface model convert to 2D image stack? Question: OK to start with let me be clear, I am not interested in converting an image stack into a 3D model. I have an *.stl file (a triangulated surface mesh) & I would like to slice it back into an image stack. I’ve had a …

Total answers: 3

ImportError: cannot import name _imaging

ImportError: cannot import name _imaging Question: I installed Pillow, and after I want to do: from PIL import Image I get the following error: Traceback (most recent call last): File “<console>”, line 1, in <module> File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line 61, in <module> ImportError: cannot import name _imaging However, if I import these separately, everything is fine, …

Total answers: 14

reading *.his (image) file in Python

reading *.his (image) file in Python Question: I am trying to read an image file which is in *.his format. Honestly, I do not know much about this format, on spending some time on google I figured out that its a binary format and it can be read in ImageJ software as a raw format …

Total answers: 2

How to CREATE a transparent gif (or png) with PIL (python-imaging)

How to CREATE a transparent gif (or png) with PIL (python-imaging) Question: Trying to create a transparent gif with PIL. So far I have this: from PIL import Image img = Image.new(‘RGBA’, (100, 100), (255, 0, 0, 0)) img.save(“test.gif”, “GIF”, transparency=0) Everything I’ve found so far refers to manipulating an existing image to adjust it’s …

Total answers: 1

Python Imaging Library – Text rendering

Python Imaging Library – Text rendering Question: I’m trying to render some text using PIL, but the result that comes out is, frankly, crap. For example, here’s some text I wrote in Photoshop: and what comes out of PIL: As you can see, the results from PIL is less than satisfactory. Maybe I’m just being …

Total answers: 6

How do I draw text at an angle using python's PIL?

How do I draw text at an angle using python's PIL? Question: Using Python I want to be able to draw text at different angles using PIL. For example, imagine you were drawing the number around the face of a clock. The number 3 would appear as expected whereas 12 would we drawn rotated counter-clockwise …

Total answers: 7