bugGNU Octave - Bugs: bug #49140, png RGB image incorrectly read as...

 
 

bug #49140: png RGB image incorrectly read as logical.rather than double

Submitter:  Francesco Potortì <pot>
Submitted:  Tue 20 Sep 2016 02:32:20 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Dec 2017 05:11:44 AM UTC, comment #3: 

I've made a post to https://savannah.gnu.org/bugs/?41584 if someone wants to follow there.

Dan Sebald <sebald>
Tue 20 Sep 2016 04:33:34 PM UTC, comment #2: 

A simple workaround for my case is:


img = imread(legendfile);
if (size(img,3) == 3 && islogical(img))
  img = double(img);
endif


If there are no other cases of 3-D logical matrices, maybe this can be a good solution.

Francesco Potortì <pot>
Tue 20 Sep 2016 04:09:14 PM UTC, comment #1: 

Thanks, this is a duplicate of known bug #41584.

Mike Miller <mtmiller>
Group Member
Tue 20 Sep 2016 02:32:20 PM UTC, original submission:  

I suppose this happens because there are only saturated colours in this image:


> imshow legend.png   # produces error
> im = imread("legend.png");
> imshow(im)          # same error
> imshow(double(im))  # ok


Francesco Potortì <pot>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38563:  legend.png added by pot (1KiB - image/png)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by pot (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-20 mtmiller CategoryPlotting Octave Function
        StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #41584
    2016-09-20 pot Attached File- Added legend.png, #38563

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code