bugGNU Octave - Bugs: bug #52866, print() function doesn't accept...

 
 

bug #52866: print() function doesn't accept '-RGBImage' option

Submitted by:  Thomas Aiman <thomasaiman>
Submitted on:  Thu 11 Jan 2018 11:27:29 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 15 Jan 2018 04:07:00 PM UTC, comment #3:

I ran this in MATLAB:

size(a) = [875, 1167, 3]
class(a) = 'uint8'
size(b) = [1750, 2333, 3]
class(b) = 'uint8'
imwrite outputs are attached.

(file #42915, file #42916)

Thomas Aiman <thomasaiman>
Sun 14 Jan 2018 09:49:54 AM UTC, comment #2:

This could be implemented in two ways:

  • use a print command to produce a PNG temporary file and use imread to get the pixel data (slow, works for both gnuplot and opengl)
  • prepare the figure for printing and use "getframe" instead of _opengl_print_ (fast, opengl only). In order to honor the resolution we can probably use interp2 afterwards.

What do those commands return in Matlab:

Pantxo Diribarne <pantxo>
Project Member
Thu 11 Jan 2018 11:38:41 PM UTC, comment #1:

Confirmed. This is a relatively new option which explains why it is unsupported. I've made this a wish list item to implement.

Rik <rik5>
Project Administrator
Thu 11 Jan 2018 11:27:29 PM UTC, original submission:

From the MATLAB documentation:
https://www.mathworks.com/help/matlab/ref/print.html

cdata = print('-RGBImage'); returns the RGB image data for the current figure. This option differs from screen captures in that all printing features apply to the output. You can also specify the resolution, renderer, '-noui', and fig options with this syntax. However, you cannot specify a Simulink block diagram.

A simple example that works in MATLAB:

Octave returns the following error:

Thomas Aiman <thomasaiman>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #42915:  r200.png added by thomasaiman (23KiB - image/png)
file #42916:  r400.png added by thomasaiman (60KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by thomasaiman (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Jan 2018 04:07:00 PM UTCthomasaimanAttached File-=>Added r200.png, #42915
      Attached File-=>Added r400.png, #42916
    Thu 11 Jan 2018 11:38:41 PM UTCrik5Severity3 - Normal=>1 - Wish
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1