[Image-SIG] A right mess I've made!

Bernhard Herzog herzog@online.de
27 Jan 2000 19:51:21 +0100

John Hinsley <jhinsley@telinco.co.uk> writes:


> Here's my tale of woe.
> I downloaded Sketch 6.4 as an .rpm and the python imaging 1.0b1-1.rpm
> and used them with the python bits & pieces in the SuSE 6.1
> distribution. I could save as .ps but I could'nt open any postscript
> files, even those I'd made in Sketch! It looked as though Sketch was
> trying to open them, a sort of white ghost square appeared, but it
> failed.

What did you do exactly? EPS files, even those generated by Sketch,
should be embedded with Edit->Create->Load Image... or the equivalent
button in the toolbar, the rightmost one, just like a raster image.
Sketch treats embedded EPS files pretty much like embedded raster
images, except for printing of course.

ghostscript is currently required to render a preview image, though.

File->Open or File->Insert Document work only when the EPS is an Adobe
Illustrator file or sufficiently similar to one. If you want to import
an EPS file so that you can edit its contents, you might want to try

I should probably make this a little clearer in the UI by removing .ps
and .eps from the list of extensions of the AI-import filter.

> I vaguely remembered that an earlier version did this because of a
> problem with the Python imaging library, and that there was a patch
> available. Does this mean that the rpm was built without the patches
> for the imaging libraries? Is there a "correct" rpm out there
> somewhere?

The rpm should work. There's no PIL patch required.

> Attempts to build sketch using a mixture of source and rpms failed
> dismally. In particular I made a right pigs ear of installing the
> python imaging library. On step 8, the read me says:
> "8. To build a dynamically loaded module, just type "make":
> 	$ make
>    This will create a file called "_imaging.so".
>    Then type (assuming a standard shell):
> 	$ python
> 	>>> import _imaging
> 	>>> import Image
>    If both imports works, you've successfully added PIL to your Python
>    environment."
> Well, for me one of the imports didn't work.

"didn't work" is a pretty vague description. With the precise error
messages we might be able to help you.

> (After all, a gtk version will be along shortly!)

"shortly" may be a bit optimistic at the moment...

> Now, when I call sketch I get:
> Traceback (innermost last):
>   File "/usr/lib/sketch-0.6.4/Sketch/Graphics/graphics.py", line 32, in
> ?
>     import Image
> ImportError: No module named Image

copy the PIL.pth file from the PIL distribution to
/usr/lib/python1.5/site-packages or whereever you put you PIL/
subdirectory as described in step 9 of the PIL installation

Bernhard Herzog   | Sketch, a drawing program for Unix
herzog@online.de  | http://sketch.sourceforge.net/