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

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

[Octave-bug-tracker] [bug #54697] uicontrol function with cdata does not


From: anonymous
Subject: [Octave-bug-tracker] [bug #54697] uicontrol function with cdata does not work correctly
Date: Thu, 20 Sep 2018 10:13:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15

URL:
  <https://savannah.gnu.org/bugs/?54697>

                 Summary: uicontrol function with cdata does not work
correctly
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 20 Sep 2018 02:13:15 PM UTC
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: joemalk
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Mac OS

    _______________________________________________________

Details:

I have installed, on MacOS High Sierra, the homebrew installation of Octave,
ver 4.4.1_1, using the --with-qt option. When I input


myimage=imread('floppy.png')
myfigure = figure()
myuicontrol =
uicontrol("parent",myfigure,"cdata",myimage,"style","pushbutton")


I get the following error message:

error: invalid value for array property "cdata"
error: __go_uicontrol__: unable to create graphics handle
error: called from
    uicontrol at line 109 column 8

This is because cdata is not expected to be a uint8. But, even after you
convert myimage to double (and divide by 255), namely using


myuicontrol =
uicontrol("parent",myfigure,"cdata",double(myimage)/255,"style","pushbutton");


the error goes away, but the image still does not get displayed. Looking at
comment #2 in

https://savannah.gnu.org/bugs/index.php?44332

it looks like cdata will be implemented in version 5.0. Does it mean it is not
yet correctly implemented yet?

An even more minimalistic example is:


uicontrol("parent",myfigure,"cdata",zeros(36,36,3),"style","pushbutton");


(or even if one replaces zeros(36,36,3) by ones(36,36,3))

one gets only a blank button, in all cases. See the attached image.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 20 Sep 2018 02:13:15 PM UTC  Name: floppy.png  Size: 222B   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=45060>
-------------------------------------------------------
Date: Thu 20 Sep 2018 02:13:15 PM UTC  Name: Screen Shot 2018-09-20 at 5.11.02
PM.png  Size: 115KiB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=45061>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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