Originally Posted by: Alex.M
Martin, could you provide a clear example demonstrating the file access issue? It will simplify debugging.
Thanks
The behaviour, which the display of gnuplot-generated images (that is what Maxima produces) relies on is this:
- if a name in the placeholder of the image region is given, then the region tries to display that image.
- if the image does not exist, nothing is displayed.
- if the file appears in the file system, the image is displayed
- if the file changes, the display is updated
- existance and update checks are done upon re-calculation. Perhaps sort of delay for reading the file is required if the file is still written while the image region tries to access it.
Currently, whenever a file generation fails due to some error on Maxima side, then I get a dialog asking if the file should be generated. If I confirm, then a file is written but possibly not closed immediately, as the file manager complains about an invalid image file.
May that lead to a conflict, when some process tries to write the file?
An example, where a clearly existing png image is ignored by the Image region, is given in the attachment of
http://smath.info/bts/Issues/IssueDetail.aspx?id=2400Originally Posted by: Alex.M
Martin, could you provide a clear example demonstrating the file access issue? It will simplify debugging.
Also what image file formats can MAXIMA output? True vector graphics in .NET is metafile (emf), which renders well in Smath, then there is pdf which also renders well. Both SVG renders I tried have their own quirks... I will test SVGSharp to see if I can get SVG resizing work correctly (I failed last time) and if it will work with DISLIN, another plugin which uses Image Region.
Thanks
Gnuplot can produce pdf images, however, I never tried that. Going for that option would require some rework of the Draw functions in the Maxima plugin, as currently, only svg (default) or png are supported. Easiest workaround would perhaps be the switch from svg to png as default image format.
The internal MaximaDrawregion uses these functions:
using SharpVectors.Dom.Svg;
using SharpVectors.Renderers.Forms;
using SharpVectors.Renderers.Gdi;
This seems to work for gnuplot generated images.