the alpha channel in the msb makes it appeared to be negative. please use j803 which strips the alpha channel.
It seems readpng cannot decode correctly png files written by Qt. I'll check. On Oct 23, 2014 12:13 AM, "Jon Hough" <jgho...@outlook.com> wrote: > You were correct that I should be using the jqtide functions: > > readimg_jqtide_ > > > > writeimg_jqtide_ > > I still have a couple of questions though.1. Why are the pixel values (in > the matrix) negative? This seem odd.2. If I load an image using readpng, I > cannot then save it using writeimg_jqtide_. The resulting bitmap cannot be > read by any program on my computer (at the time I tested this I was using a > Mac).Is this behavior expected? > Thanks,Jon> Date: Tue, 21 Oct 2014 23:35:00 +0800 > > From: bbill....@gmail.com > > To: programm...@jsoftware.com > > Subject: Re: [Jprogramming] Bitmaps and Image addons > > > > The png addon in j803 can read and write png. > > > > require 'png' > > png=: readpng jpath '~temp/viewmat.png' > > > > for jpeg, it depends on which platform you are using, you may use > > image3 as what Devon had suggested. > > > > Why do you avoid Qt? > > > > Вт, 21 окт 2014, Jon Hough написал(а): > > > Scratch that. Using the QT functions I can get what I want.I would > like to know if I can read JPEG and PNG files without the jQT functions. > > > > > > > From: jgho...@outlook.com > > > > To: programm...@jsoftware.com > > > > Date: Tue, 21 Oct 2014 15:36:24 +0100 > > > > Subject: Re: [Jprogramming] Bitmaps and Image addons > > > > > > > > I'm not sure how I would use the jQT functionality. I want to get > the matrix representation of a jpeg or png file.e.g. I have a jpeg file > cat.jpg > > > > > > > > require 'bmp';'graphics/bmp' > > > > > > > > > > > > > > > > > > > > > > > > ]bmp =. readbmp jpath '~/cat.jpg' > > > > > > > > > > > > > > > > not a bitmap file > > > > > > > > > > > > J claims it is not a bitmap file. I want to get the RGB(A) pixel > values of the file. > > > > > > > > > > > > > > > > > Date: Tue, 21 Oct 2014 16:28:35 +0900 > > > > > From: jgho...@outlook.com > > > > > To: programm...@jsoftware.com > > > > > Subject: Re: [Jprogramming] Bitmaps and Image addons > > > > > > > > > > It looks like rgb ----->bgr > > > > > > > > > > --- Original Message --- > > > > > > > > > > From: "Jan-Pieter Jacobs" <janpieter.jac...@gmail.com> > > > > > Sent: October 21, 2014 4:16 PM > > > > > To: programm...@jsoftware.com > > > > > Subject: Re: [Jprogramming] Bitmaps and Image addons > > > > > > > > > > Thanks for the example, but the colors seem wrong in the images > (at least > > > > > on android). > > > > > The top left one looks like it should, the others look too > blueish. maybe > > > > > an error in converting between ints and rgb triplets? > > > > > > > > > > Jan-Pieter > > > > > On 21 Oct 2014 05:51, "bill lam" <bbill....@gmail.com> wrote: > > > > > > > > > > > the qt image demo of j803 beta have been updated to > > > > > > include examples of reading and writing image files. > > > > > > > > > > > > Пн, 20 окт 2014, Jon Hough написал(а): > > > > > > > I am interested in using J with png and jpg files. But cannot > get the > > > > > > bmp addon to work with them.I noticed this in the wiki: > > > > > > > http://www.jsoftware.com/jwiki/Addons/media/image3 > > > > > > > But cannot find the image3 addon anywhere in J802. > > > > > > > Any ideas? > > > > > > > Regards. > > > > > > > > ---------------------------------------------------------------------- > > > > > > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > > > > > > > > > > -- > > > > > > regards, > > > > > > ==================================================== > > > > > > GPG key 1024D/4434BAB3 2008-08-24 > > > > > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > > > > > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > > > > > > > ---------------------------------------------------------------------- > > > > > > 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 > > > > -- > > regards, > > ==================================================== > > GPG key 1024D/4434BAB3 2008-08-24 > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > > ---------------------------------------------------------------------- > > 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