David -
I don't know why it's doing this, but "getbmp" is reversing the RGB
triplets. You can redefine it with the reversing line commented out:
getbmp_jviewmat_=: 3 : 0
gid=. y, (0=#y) # GID
glsel gid
box=. 0 0,glqwh''
res=. glqpixels box
nub=. ~. res
NB. res=. (nub i. res) { 256 #. |."1 [ 256 256 256 #: nub
(3 2 { box) $ res
)
This should fix your problem for now.
Devon
On 4/11/07, David Jones asked about "1. BMPs on Intel Macs. Wrong colour?"
When I open J and go
require 'plot graph'
viewmat 1 2 3
savemat_jviewmat_ ''
viewmat shows me a window that is blue on the left (blue green
magenta from left to right).
If I open the viewmat.bmp file in Preview by going:
open $HOME/j601/temp/viewmat.bmp
then Preview shows me a picture that is red on the left (red green
magenta).
Red and Blue have been swapped. I can fix this using netpbm when I
want to use the images in something else, but it is a bit of a pain.
I'm using j601 on an Intel Mac running OS X 10.4.9.
$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
drj
PS. For Americans using grep to find this later: wrong color.
--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm