Hi,
write_image was an adverb so that it could be used dyadically to pass options to the write verb.
For example
95 im_data write_image filename.jpg
bypasses the global jpeg_quality setting and uses 95.
Whether that was a wise choice or not, that is what I decided was most useful back then.
Amazing, someone other than me is using image3 :)
Best, Cliff

On 6/12/2013 11:58 AM, Alexander Epifanov wrote:
It works, thank you,

but I did not understand what is the different, I mean how it works if it
is adverb.

Regards,

On Wed, Jun 12, 2013 at 11:14 AM, Dan Bron <[email protected]> wrote:

Image3 doesn't work on my platform, but inspecting the source reveals that
write_image is actually an adverb, not a verb (I find this strange).  For
your purposes, you could probably write a verbal wrapper like so:

         wi =: 4 : 'x write_image y'

and then use it in place of write_image

    (('small/'&, wi~ ((3 3)&resize_image)@:read_image)@:>) i

Again, image3 doesn't run on my system, so this is plausible but untested.

-Dan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Alexander Epifanov
Sent: Wednesday, June 12, 2013 10:35 AM
To: Chat forum
Subject: [Jchat] "|value error: m | x m write_jpeg y" - what???

Hello,

<pre>
"C:\Program Files (x86)\j701\bin\jconsole"
    require'media/image3'
    i=:<'_bileti.jpg'
    'a b'=:(('small/'&, (;)~ ((3 3)&resize_image)@:read_image)@:>) i
    a
188 183 177
213 214 218
208 211 216
    b
small/_bileti.jpg
    a write_image b
638
    (('small/'&, (write_image)~ ((3 3)&resize_image)@:read_image)@:>) i
|value error: m
|   x     m write_jpeg y
</pre>

Why?

--
Regards,
   Alexander.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Clifford A. Reiter
Lafayette College, Easton, PA 18042
http://webbox.lafayette.edu/~reiterc/

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to