After playing a bit with echo it seems qt_jpg is working well, since echo as a last statement is executed and gives the (shape of the) rgb and the (content of) file, input for qt_writeimg (which calls writeimg_jqtide_ )
R.E. Boss -----Original Message----- From: Programming <[email protected]> On Behalf Of Raul Miller Sent: dinsdag 23 november 2021 20:56 To: Programming forum <[email protected]> Subject: Re: [Jprogramming] saving an image as jpg fails I cannot reproduce this problem. In jqt (which I think is what you are using here), if you run: open 'jzplot' and then find the definition which begins with qt_jpg=: 3 : 0 -- can you insert echo statements there which show whether or not that verb is being used? If so, and if the data looks good there, this is probably an issue with qt on your system, rather than an issue with plot. (It's basically setting up for and calling writeimg_jqtide_ .) Thanks, -- Raul On Tue, Nov 23, 2021 at 2:47 PM R.E. Boss <[email protected]> wrote: > > Here they are both not stored in jpath '~install', but that can be a security > issue, neither in '~home'. > pd 'save png "',(jpath '~user'),'/example.png"' works, pd 'save jpg > "',(jpath '~user'),'/example.jpg"' does not. > > > R.E. Boss > > > -----Original Message----- > From: Programming <[email protected]> On Behalf > Of Raul Miller > Sent: dinsdag 23 november 2021 18:44 > To: Programming forum <[email protected]> > Subject: Re: [Jprogramming] saving an image as jpg fails > > They are stored in jpath '~install' > > But, for example, this creates both image files, also: > > load'plot' > pd 'reset' > pd p:i.10 > pd 'show' > pd 'save png "/tmp/example.png"' > pd 'save jpg "/tmp/example.jpg"' > > And, this also gives me both files: > > pd 'save png "',(jpath '~user'),'/example.png"' > pd 'save jpg "',(jpath '~user'),'/example.jpg"' > > FYI, > > -- > Raul > > On Tue, Nov 23, 2021 at 11:52 AM R.E. Boss <[email protected]> wrote: > > > > If I copy your example, I have no clue where the files are stored, > > definitely not in my user directory. > > If I let the name precede by the folder indication, then example.png works, > > but the .jpg not, while nothing happens. > > (In the first attempts today, with beta-u, an empty .jpg file with > > the correct name was created.) I am not succeeding in creating any > > file(name) with fwrite, but that is probably my inexperience. > > > > > > R.E. Boss > > > > > > -----Original Message----- > > From: Programming <[email protected]> On > > Behalf Of Raul Miller > > Sent: dinsdag 23 november 2021 17:04 > > To: Programming forum <[email protected]> > > Subject: Re: [Jprogramming] saving an image as jpg fails > > > > It seems to work for me. > > > > I ran: > > > > load'plot' > > pd 'reset' > > pd p:i.10 > > pd 'show' > > pd 'save png "example.png"' > > pd 'save jpg "example.jpg"' > > > > And this created an example.png and an example.jpg file in my j903 > > directory. > > > > JVERSION > > Engine: j903/j64avx2/darwin > > Beta-v: commercial/2021-11-16T22:02:28 > > Library: 9.03.07 > > Qt IDE: 1.9.3/5.15.2(5.15.2) > > Platform: Darwin 64 > > Installer: J903 install > > InstallPath: /users/rauldmiller/applications/j903 > > Contact: www.jsoftware.com > > > > What happens for you? (Any error messages? Can you create a file > > with that name using fwrite?) > > > > Thanks, > > > > -- > > Raul > > > > On Tue, Nov 23, 2021 at 10:49 AM R.E. Boss <[email protected]> wrote: > > > > > > Any reason why > > > pd 'save jpg "filename.jpg"' > > > does not work anymore, whereas > > > pd 'save png "filename.png"' > > > still works? > > > > > > Engine: j903/j64avx2/windows > > > Beta-v: commercial/2021-11-16T21:47:12 > > > Library: 9.03.06 > > > Qt IDE: 1.9.2/5.12.10(5.12.10) > > > Platform: Win 64 > > > Installer: J903 install > > > InstallPath: c:/program files/j903 > > > Contact: www.jsoftware.com > > > > > > > > > R.E. Boss > > > > > > ------------------------------------------------------------------ > > > -- > > > -- For information about J forums see > > > http://www.jsoftware.com/forums.htm > > -------------------------------------------------------------------- > > -- For information about J forums see > > http://www.jsoftware.com/forums.htm > > -------------------------------------------------------------------- > > -- For information about J forums see > > http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
