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

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

[Octave-bug-tracker] [bug #65384] image 'cdata' property fails to update


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #65384] image 'cdata' property fails to update class-dependent color behavior
Date: Wed, 28 Feb 2024 21:43:40 -0500 (EST)

Follow-up Comment #1, bug#65384 (group octave):

playing around a bit - matlab and octave behave the same if you use image
instead of imagesc.  There, 'cdatamapping' is set to manual.  if you change
cdata the image changes to a dark purple. if you then set cdatamapping to
scaled, it looks like the colored squares.  in octave, if you had first set
the image cdata to type uint8, changing cdatamapping to scaled and assigning
the cdata fails to change the image to colored squares. my guess is that
something internal is being set to type uint8, and the set is failing to
update that type so the scaling never changes.

Also, 'clim' is strange.  clim is supposed to be a 2-element vector indexing
the colormap, and only belongs to the axes object. In matlab, get(imagehandle,
'clim') produces an error.  But in octave, while get(imagehandle) shows no
clim property: 


H = image;
get(H, 'clim')
ans = 
     1    62    1   -Inf
get(gca, 'clim')
ans
     0   1



H = image (zeros (16, 16, 3, 'uint8'));
get(H,'clim')
ans =

     0     0   Inf  -Inf

get(gca,'clim')
ans =

     0   255


class of both is still double, but there are apparently some internal hidden
properties in image, and seems like creating a uint8 image is setting one in a
way that prevents it from being properly updated.  Will try to step through
image to see if i can see what it is.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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