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

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

[Octave-bug-tracker] [bug #59242] ind2rgb/ind2gray errors with uint inpu


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59242] ind2rgb/ind2gray errors with uint input containing the maximum integer value outside of colormap range
Date: Fri, 9 Oct 2020 11:03:19 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.70

Follow-up Comment #1, bug #59242 (project octave):

Thank you for your report.
Are 64 bit integers valid input for these functions? In this case, adding 1 to
a double greater than flintmax (2^52) wouldn't change the value.

Does the attached patch look good to you?

Anyway, the current implementation looks rather inefficient to me.
Wouldn't it be better to modify `x` (i.e. assign all values outside the map to
the maximum value in the map) instead of extending `map`?

The following lets Octave be a victim of the memory overcommit killer on
Windows:

ind2rgb (uint32 (intmax ("uint32")), jet (64))



(file #49953)
    _______________________________________________________

Additional Item Attachment:

File name: bug59242_ind2x.patch           Size:1 KB
    <https://file.savannah.gnu.org/file/bug59242_ind2x.patch?file_id=49953>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59242>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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