octave-maintainers
[Top][All Lists]
Advanced

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

Re: Offscreen rendering with OSMesa and gl2ps


From: Andreas Weber
Subject: Re: Offscreen rendering with OSMesa and gl2ps
Date: Fri, 13 Feb 2015 17:38:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

Am 13.02.2015 um 00:42 schrieb Andreas Weber:
> Am 03.02.2015 um 06:01 schrieb Rik:
>> It would be very nice to be able to finally get rid of gnuplot for creating
>> the documentation.  Do the experiments you have done suggest that this is
>> relatively simple and could be implemented in time for the 4.0 release?
> 
> I've added libinterp/dldfcn/__osmesa_print__.cc in
> http://hg.savannah.gnu.org/hgweb/octave/rev/a81177f4bfe6.
> 
> My plan is to call __osmesa_print__ for graphics_toolkit fltk and qt if
> the figure is invisible. If the figure is visible the traditional
> toolkit print method is used.

This is implemented with cset 59ad278cfb98.
(http://hg.savannah.gnu.org/hgweb/octave/rev/59ad278cfb98)

> Since we can capture the OSMesa bitmap directly (without gl2ps ->
> ghostscript) I would like to use imwrite (which uses graphicsmagick) to
> print to .jpg, .png, bmp and so on. This would also have the effect,
> that TeX elements would be save correctly (as seen on the screen).

After some thoughts I decided against this implementation to not confuse
the users that the generated PNG output differs if the figure is visible
or not.

If someone wants a direct capture he can still use
img = __osmesa_print__ (gcf);
imwrite (img, "out.png");

which is also a good addition for debugging purposes to bypass gl2ps and
ghostscript.

-- Andy



reply via email to

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