I think your code works fine, the only problem is how to get the bitmap the pd code produces into a variable. The pd 'get' function complains that clipboard is supported only on Windows - it seems to depend on pd 'clip'. :/
On Tue, Mar 31, 2020 at 8:16 AM Devon McCormick <[email protected]> wrote: > Hi - > I don't know how well this works on non-Win systems, but I use these: > load 'ide/qt/qtlib' NB. At least since v. 8.07 > read_image=: readimg_jqtide_ > write_image=: writeimg_jqtide_ > These verbs are smart enough to figure out the file format from the suffix > of the name to which you write, e.g. > ((]-1&|.)-(]-1&|."1) imgN1) write_image 'TestImg.*png*' > or > ((]-1&|.)-(]-1&|."1) imgN1) write_image 'TestImg.*jpg*' > > The writer also handles both 2D and 3D representations of images. > > I hope this helps, > > Devon > > On Tue, Mar 31, 2020 at 1:54 AM Dimitri Georganas <[email protected]> wrote: > > > Hi, > > > > I'm modeling IC bed impact due to COVID-19 and I need to output a large > > number of bitmaps, so png seems a good choice. However, PNG (cairo) > output > > results in quality loss (compared to the default option) and I was > > wondering if I am missing any libraries (libcairo is installed). It's a > > linux system. (see attachment). I have J latest version installed. > > > > While the graph looks ok the text that becomes unreadable, and part of > the > > legend text end up outside the box. I tried different width and height, > > but no luck. I use default plot command and then call pd 'cairo' to > create > > the png. > > > > I also looked at graphics/gnuplot addon, but it seems windows-specific. > Can > > you recommend any other options? > > > > Dimitri > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > -- > > Devon McCormick, CFA > > Quantitative Consultant > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
