Re: saving binary as 1 bit-per-pixel tif
Posted by
Gluender-3 on
Sep 07, 2009; 9:19am
URL: http://imagej.273.s1.nabble.com/saving-binary-as-1-bit-per-pixel-tif-tp3691279p3691280.html
Just curious:
Where did you find the command: "File>Save As>Compressed TIFF ..."
(I'm using "ImageJ 1.43g daily built" and can't find it.)
>Dear all,
>
>I tried to save a binary mask as a 1-bit-per-pixel file using "File>Save
>As>Compressed TIFF ...".
>After confirming that I want to save it using 1 bit per pixel, I get the
>following error message:
>
>
>java.lang.IllegalArgumentException: Input ByteProcessor has to have
>index color model with map size of 2, got 256.
> at
>net.sf.ij.jaiio.BufferedImageCreator.createBinary(BufferedImageCreator.java:102)
> at
>net.sf.ij.jaiio.BufferedImageCreator.create(BufferedImageCreator.java:77)
> at net.sf.ij.jaiio.JAIWriter.write(JAIWriter.java:143)
> at
>net.sf.ij.plugin.ImageIOSaveAsPlugin.write(ImageIOSaveAsPlugin.java:237)
> at net.sf.ij.plugin.ImageIOSaveAsPlugin.run(ImageIOSaveAsPlugin.java:207)
>[...]
>
>
>I already tried editing the LUT to contain only 2 colours, and choosing
>different compression methods... I guess the problem is that the image
>still has 256 grey levels (of which only 0 and 255 are used).
>
>How can I reduce the map size to 2?
>
>Is there any other memory-saving way of saving big binary images?
>
>Thanks,
>Jan
AFAIK ImageJ uses minimum 8bit per pixel.
Best
--
Herbie
------------------------
<
http://www.gluender.de>