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

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

[Octave-bug-tracker] [bug #45779] Writing and 8-bit image to BMP produce


From: Ian Journeaux
Subject: [Octave-bug-tracker] [bug #45779] Writing and 8-bit image to BMP produces a 24-bit bmp
Date: Mon, 17 Aug 2015 13:58:34 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?45779>

                 Summary: Writing and 8-bit image to BMP produces a 24-bit bmp
                 Project: GNU Octave
            Submitted by: ijourneaux
            Submitted on: Mon 17 Aug 2015 01:58:33 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Ian Journeaux
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

With Octave 4.1.0+ MXE compiled locally with Default config, to successfully
save an 8-bit image to a bmp file requires using

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

If I understand Matlab (maybe I am misinterpreting Matlab) 

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

should also work but, with Octave, still produces a 24-bit image. 




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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