Seite 1 von 1

PIL und import von 3x16 bits bilder

Verfasst: Dienstag 29. Juli 2008, 10:30
von charles
Hallo,

Ich versuche seit einige zeit ein weg um 3X16 bits Bilder in PIL zu importieren. (jeder Kanal separat importieren als PIL Bild ).

Ich habe bis jetzt keine überzeugende Lösung gefunden. Hat jemand ein gute tip? Die bilder liegen als TIF format.


Viele Grüsse

Charles

Verfasst: Dienstag 29. Juli 2008, 12:49
von HWK
PIL scheint per se keine 48-Bit-Images verarbeiten zu können. Evtl. wäre pytiff eine Alternative:
http://www.haynold.com/software_projects/2004/pytiff/
http://mail.python.org/pipermail/image- ... 02902.html
MfG
HWK

Verfasst: Dienstag 29. Juli 2008, 16:31
von charles
Danke für die Links.

Leider ich habe nur Microsoft visual studio 2005, und kann nicht installieren. Es fragte nach Microsoft visual studio 2003. Brauche ich unbedingt Microsoft visual studio 2003 oder soll ich irgendwas anpassen?
Wenn Jemand ein gebildete version hat nehme ich es auch ;)

Verfasst: Dienstag 29. Juli 2008, 19:32
von HWK

Code: Alles auswählen

running install
running build
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
Das zeigt er bei mir an. Lade Dir also MingW32 herunter und kompiliere es damit.
MfG
HWK

Verfasst: Mittwoch 30. Juli 2008, 02:12
von Leonidas
Wobei man auch sagen sollte, dass man Cygwin da gar nicht braucht, MinGW (+MSYS) reichen schon.

Verfasst: Mittwoch 30. Juli 2008, 13:59
von charles
Ok, danke für die hilfe.

Ich habe probiert mit Cygwin, MingGW32 zu compilieren aber ohne Erfolg:


$ python setup.py install
running install
running build
running build_ext
Traceback (most recent call last):
File "setup.py", line 45, in <module>
("local/share/doc/pytiff", ["test_pytiff.py", "pytiff.html", "README", "CHAN
GES"])
File "/tmp/python.6884/usr/lib/python2.5/distutils/core.py", line 151, in setu
p
File "/tmp/python.6884/usr/lib/python2.5/distutils/dist.py", line 974, in run_
commands
File "/tmp/python.6884/usr/lib/python2.5/distutils/dist.py", line 994, in run_
command
File "/tmp/python.6884/usr/lib/python2.5/distutils/command/install.py", line 5
06, in run
File "/usr/lib/python2.5/cmd.py", line 333, in run_command
del help[cmd]
File "/tmp/python.6884/usr/lib/python2.5/distutils/dist.py", line 994, in run_
command
File "/tmp/python.6884/usr/lib/python2.5/distutils/command/build.py", line 112
, in run
File "/usr/lib/python2.5/cmd.py", line 333, in run_command
del help[cmd]
File "/tmp/python.6884/usr/lib/python2.5/distutils/dist.py", line 994, in run_
command
File "/tmp/python.6884/usr/lib/python2.5/distutils/command/build_ext.py", line
264, in run
File "/tmp/python.6884/usr/lib/python2.5/distutils/ccompiler.py", line 1175, i
n new_compiler
File "/tmp/python.6884/usr/lib/python2.5/distutils/cygwinccompiler.py", line 2
92, in __init__
File "/tmp/python.6884/usr/lib/python2.5/distutils/cygwinccompiler.py", line 8
4, in __init__
File "/tmp/python.6884/usr/lib/python2.5/distutils/cygwinccompiler.py", line 4
24, in get_versions
File "/tmp/python.6884/usr/lib/python2.5/distutils/version.py", line 40, in __
init__
File "/tmp/python.6884/usr/lib/python2.5/distutils/version.py", line 107, in p
arse
ValueError: invalid version number '2.18.50.20080625'

was mache ich falsch?

Verfasst: Donnerstag 31. Juli 2008, 13:00
von charles
Also hier die todo list:

1) minGW installieren
2) Import mingw-libjpeg-6b-2 und libtiff-3.8.2-2 (kopieren in mingw ordner damit minGW kompilieren kann)
3) libtiff-3.dll libtiffxx-3.dll libjpeg.dll kopieren in C:\WINDOWS\system32
damit Windows die dll kennt
4) config file für python install
5) install pytiff.

Alles unter dos command.