Can you save via the imsave() command? (E.g. when using compression?) That is, is this error specific to trying to use the TIFF_NONE flag, or general to saving images (or TIFF images) on Win7 64? This may be an issue with the underlying FreeImage library, or a lingering 64-bit bug in the wrappers. So if you could do a bit more sleuthing and figure out the exact trigger for the problem, that would be very helpful in fixing it. Thanks, Zach On Jul 9, 2012, at 9:13 AM, Sigmund wrote:
Hallo!
As I wrote, the workaround:
Am Samstag, 12. Mai 2012 15:47:10 UTC+2 schrieb Zachary Pincus: import skimage.io._plugins.freeimage_plugin as fi fi.write(image, 'whatever.tif', fi.IO_FLAGS.TIFF_NONE)
by Zach worked fine for me. Now I tried the same code on a WIN 7 64 bit system (EPD 7.3.1) and got the following error:
Traceback (most recent call last): File "G:\Marwen\Summer.py", line 67, in <module> fi.write(summation, str(datensatz)+"_interval-"+str(interval_length)+"_"+str(count)+'.tif', fi.IO_FLAGS.TIFF_NONE) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 538, in write bitmap, fi_type = _array_to_bitmap(array) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 604, in _array_to_bitmap raise ValueError('Cannot write arrays of given type and shape.') ValueError: Cannot write arrays of given type and shape.
I checked the .dtype of the array and compared them to the one on the 32bit and the OS X system but coutn't see any difference.
I'm reading several Images with numpy.array(io.imread(bild, plugin="freeimage"),dtype=np.int32) and sum then up one by one to write them out afterwards as one file.
Siggi