bugGNU Octave - Bugs: bug #55436, Add support for more types for...

 
 

bug #55436: Add support for more types for image's cdata

Submitted by:  Guillaume <gyom>
Submitted on:  Thu 10 Jan 2019 11:05:43 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 12 Jan 2019 12:15:14 PM UTC, comment #2:

Following the code, it looks like the cdata is implicitly cast to double when calling "convert_cdata_2". I don't think this is possible without loosing precision at least for int64 and uint64.
Since we pass the colors as float values to glColor that might not be a problem after all.

You might also want to add the same full list of type constraints to the patch and surface properties as well.

Can you create a full fledged patch out of your changes?

Markus Mützel <mmuetzel>
Project Member
Thu 10 Jan 2019 11:20:45 AM UTC, comment #1:

FWIW, Matlab seems to support all these types:
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

https://de.mathworks.com/help/matlab/ref/matlab.graphics.primitive.image-properties.html#budqsu__sep_shared-CData

Markus Mützel <mmuetzel>
Project Member
Thu 10 Jan 2019 11:05:43 AM UTC, original submission:

Currently, only a few data types are supported with image() and imagesc():

Following comment #3 in bug #46933, I made the following change in libinterp/corefcn/graphics.cc:

and while it then works with, eg, int16, there is still an error for other types:

so I also modified libinterp/corefcn/graphics.in.h:

It does seem to work for me but I wonder if it doesn't create problems elsewhere as it was not implemented in the first place.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.4