bugGNU Octave - Bugs: bug #31161, image() opens gnuplot despite...

 
 

bug #31161: image() opens gnuplot despite image_viewer("xloadimage %s")

Submitter:  Andreas Weber <andy1978>
Submitted:  Wed 29 Sep 2010 05:56:31 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.3.52 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 22 Oct 2010 08:30:09 AM UTC, comment #2: 

I removed the image_viewer function from Octave, and with it, support for viewing images with external programs like xloadimage, so I'm closing this bug report.

John W. Eaton <jwe>
Group administrator
Mon 18 Oct 2010 04:15:35 PM UTC, comment #1: 

I consider using image viewers other than the Octave graphics renderer (currently either gnuplot or the new OpenGL+FLTK backend) to be obsolete because it is highly unlikely that any external image viewer will ever integrate properly with Octave's other graphics features.  So rather than fixing the graphics backends to respect the image_viewer selection, I think we should be removing support for this feature.  But before doing that, I will discuss it with others on the maintainers mailing list.

If you want to use some external program to view images, it should be relatively easy to write a function that would save the image using imwrite and then call system to run the external program to display the image file.

John W. Eaton <jwe>
Group administrator
Wed 29 Sep 2010 05:56:31 AM UTC, original submission:  

Debian squeeze, Linux version 2.6.32-5-amd64 (Debian 2.6.32-20) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-2) ) #1 SMP Thu Aug 12 13:01:50 UTC 2010

fresh build (28.9.2010) from the mercurial version http://www.octave.org/hg/octave

GNU Octave, version 3.3.52+

HowTo reproduce:
octave -q
image_viewer("xloadimage %s")
image(rand(100)*100)

this opens a gnuplot windows with title "Figure 1" and the axes scaled from 1..100 (not expected) and the expected xloadimage windows.

Looking deeper into /usr/local/share/octave/3.3.52+/m/image/image.m
I see that
  [ax, varargin, nargin] = _plt_get_axis_arg_ ("image", varargin{:});
opens the gnuplot window. I set a "keyboard" before and after the line. After the first "return" the gnuplot windows pops up.

by the way:
function _img_via_file_ in image_viewer.m
calls "status = system (sprintf ("( %s && %s) > /dev/null 2>&1 &", command, rm));"
but because the command is run in background (the last &), status always equals to 0 so the error message "image_viewer: the image viewing command failed" is never shown.


HowTo reproduce:
octave -q
octave:1> image_viewer("this_is_no_valid_command %s")
octave:2> image(rand(200)*100)
octave:3>


Opens an empty (only axes) gnuplot windows but I think it is intended, that the error message above should be shown instead.

best regards, Andy

Andreas Weber <andy1978>
Group Member

 

(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 jwe (Posted a comment)
  • -email is unavailable- added by andy1978 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-22 jwe StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code