octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45565] Using imwrite to write an 8-bit iamge


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #45565] Using imwrite to write an 8-bit iamge to BMP creates a 24 bit image
Date: Fri, 17 Jul 2015 14:38:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.8.0

Follow-up Comment #10, bug #45565 (project octave):

Mike Miller solution works for me:


$ gm identify foo-8.bmp 
foo-8.bmp BMP 256x100+0+0 PseudoClass 256c 8-bit 26.1Ki 0.000u 0:01

$ octave
octave> img = uint8 (ones (100, 1) .* [0:255]);
octave> map = gray(256);
octave> imwrite (img, map, "foo-octave.bmp");
octave> exit

$ gm identify foo-octave.bmp 
foo-octave.bmp BMP 256x100+0+0 PseudoClass 256c 8-bit 51.2Ki 0.000u 0:01



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45565>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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