bugGNU Octave - Bugs: bug #59502, imread doesn't read correctly...

 
 

bug #59502: imread doesn't read correctly 1-bit depth .pgm file

Submitter:  alexis rivera <arivera>
Submitted:  Mon 23 Nov 2020 02:17:54 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  alexis Open/Closed:  * Open
Release:  * 5.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 24 Nov 2020 07:40:35 PM UTC, comment #3: 

This might be a duplicate of bug #51264 (or bug #41584 ).

Hartmut <hardy>
Mon 23 Nov 2020 03:31:40 AM UTC, comment #2: 

If I change the maximum gray value from 1 to 2 (in the test.pgm header), it would work. But I think 1 should work as well:

http://netpbm.sourceforge.net/doc/pgm.html

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 23 Nov 2020 02:36:57 AM UTC, comment #1: 

Confirm with current stable on linux.
The problem appears to be with graphicsmagick library.
"gm display test.pgm" does not show ellips.
Using imagemagick works fine ("display test.pgm")

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 23 Nov 2020 02:17:54 AM UTC, original submission:  

Hi,

I created a 64x64 1-bit depth pgm file containing an ellipse.  When I read it as follows:
X = imread('test.pgm')

The result is a 64 matrix of all ones.

However, imread works fine with a 64x64 .pbm file
X = imread('test.pbm') % this works

I am running octave-5.2.0_1-w32 on a windows 10 machine.  Another detail is that I downloaded the .zip file instead of the installer. 

Thanks,
Alexis

alexis rivera <arivera>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50317:  test.pgm added by arivera (4KiB - application/octet-stream - test images)
file #50318:  test.pbm added by arivera (521B - application/octet-stream - test images)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by arivera (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-23 arivera Attached File- Added test.pgm, #50317
        Attached File- Added test.pbm, #50318

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code