qimage2ndarray

qimage2ndarray is a small python extension for quickly converting between QImages and numpy.ndarrays (in both directions). These are very common tasks when programming e.g. scientific visualizations in Python using PyQt4 as the GUI library.

Similar code was found in Qwt and floating around on mailing lists, but qimage2ndarray has the following unique feature set:

Documentation

API documentation can be found in the doc/ subdirectory.

Code

The extension is open source, BSD-licensed, and the mercurial repository can be browsed online or cloned using Mercurial:

hg clone http://www.informatik.uni-hamburg.de/~meine/hg/qimage2ndarray/

Installation

The current release (version 1.0) is available for download below or via PyPI, i.e. you might just issue:

easy_install qimage2ndarray

to compile and install the extension.

Hint: If you want to specify another compiler, e.g. in order to use MinGW instead of the Microsoft compiler on Windows, you can do it like this:

python setup.py build -c mingw32 install

Latest Stable Release

File: qimage2ndarray-1.0.tar.gz(48.01 kb; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.tar.gz' to disk
File: qimage2ndarray-1.0.tar.gz.asc(198 bytes; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.tar.gz.asc' to disk
File: qimage2ndarray-1.0.win32-py2.5.exe(69.37 kb; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.win32-py2.5.exe' to disk
File: qimage2ndarray-1.0.win32-py2.5.exe.asc(198 bytes; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.win32-py2.5.exe.asc' to disk
File: qimage2ndarray-1.0.zip(54.38 kb; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.zip' to disk
File: qimage2ndarray-1.0.zip.asc(198 bytes; Wed, Jun/09/2010) download 'qimage2ndarray-1.0.zip.asc' to disk

Changelog

Version 1.0:
  • Let array2qimage support 2 channels (gray + alpha)
  • Fixed installation on OS X (where Qt libs come as "Frameworks")
Version 0.2:
  • Fixed endianness issues (tested on PowerPC arch)
  • Simplified installation on Windows (e.g. with Qt DLLs bundled with PyQt)
Version 0.1:
  • Initial Relase

Valid XHTML 1.0! Valid CSS!
This page was last modified: Monday, August 16, 2010 hacker emblem