help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imwrite: unsupported data type logical


From: Primoz PETERLIN
Subject: imwrite: unsupported data type logical
Date: Fri, 22 Feb 2008 14:47:51 +0100

Hello everyone,

When I apply an edge detection filter to an image, I end up with a two-level image, consisting of zeroes and ones. imshow() shows the image nicely, while imwrite() reports the above-mentioned error:

error: imwrite: unsupported data type logical

It seems that imwrite expects at least a graymap (8-bit depth), and doesn't know how to cope with images with 1-bit depth. I can circumvent this error by multiplying the image by 255, which promotes it to a graymap. The attached patch for imwrite.m does the job. There may be, however, some more clever ways to do it, allowing people to actually save bitmaps when necessary.

All the best,
Primoz

Attachment: imwrite.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]