Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Java - Get RGB array from image

 
Thread Tools Search this Thread
Old 01-26-2004, 07:24 PM   #1
Default Get RGB array from image


Hello, i have an image, and i'd like to obtain a table in which i store RGB
values of each pixel, and then create an another image from a
MemoryImageSource using that table. I don't know how to manage it, any idea?

Thanks
Melina

Image image2 = getToolkit().getImage("D:/Temp/b.jpg");

//Création du tableau pixel image et affichage
int w = 256;
int h = 256;
int pix[] = new int[w*h];
int index = 0;
for (int y = 0; y < h*w; y++) {
pix[index++] = ???
}
Image image = createImage(new MemoryImageSource(w, h, pix, 0, w));




Riri
  Reply With Quote
Old 01-26-2004, 07:37 PM   #2
Andrew Thompson
 
Posts: n/a
Default Re: Get RGB array from image

"Riri"...
| Hello,

Hello Riri, can I ask some things of you?

1) Stick with the threads you start, rather than
openning new ones for the same question.

2) http://www.physci.org/codes/sscce.jsp
(Your snippets are little more than useless)

3) Phrase your question of the form
"How Do I ...?" rather than "Do you know ....?"

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site


  Reply With Quote
Old 01-26-2004, 09:27 PM   #3
Riri
 
Posts: n/a
Default Re: Get RGB array from image

Thanks but that's not helping me..
R.
"Andrew Thompson" <> a écrit dans le message de
news: WTeRb.29386$...
> "Riri"...
> | Hello,
>
> Hello Riri, can I ask some things of you?
>
> 1) Stick with the threads you start, rather than
> openning new ones for the same question.
>
> 2) http://www.physci.org/codes/sscce.jsp
> (Your snippets are little more than useless)
>
> 3) Phrase your question of the form
> "How Do I ...?" rather than "Do you know ....?"
>
> --
> Andrew Thompson
> * http://www.PhySci.org/ PhySci software suite
> * http://www.1point1C.org/ 1.1C - Superluminal!
> * http://www.AThompson.info/andrew/ personal site
>
>



  Reply With Quote
Old 01-26-2004, 09:48 PM   #4
Andrew Thompson
 
Posts: n/a
Default Re: Get RGB array from image

"Riri" <> wrote in message
news:4015931f$0$29080$...
| Thanks but that's not helping me..

It was meant to help you to help yourself.
If you do not wish to do that, Elance
might be a better option for you.

--
Andrew Thompson
* http://www.PhySci.org/codes/ Web & IT help
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site


  Reply With Quote
Old 01-27-2004, 09:00 AM   #5
ak
 
Posts: n/a
Default Re: Get RGB array from image

"Riri" <> schrieb im Newsbeitrag
news:40157626$0$29086$...
> Hello, i have an image, and i'd like to obtain a table in which i store

RGB
> values of each pixel, and then create an another image from a
> MemoryImageSource using that table. I don't know how to manage it, any

idea?
>
> Thanks
> Melina
>
> Image image2 = getToolkit().getImage("D:/Temp/b.jpg");
>
> //Création du tableau pixel image et affichage
> int w = 256;
> int h = 256;
> int pix[] = new int[w*h];
> int index = 0;
> for (int y = 0; y < h*w; y++) {
> pix[index++] = ???
> }
> Image image = createImage(new MemoryImageSource(w, h, pix, 0, w));
>
>

Look at PixelGrabber
--

____________

http://reader.imagero.com the best java image reader.


  Reply With Quote
Old 01-27-2004, 09:38 AM   #6
Riri
 
Posts: n/a
Default Re: Get RGB array from image

Thanks i'll try to use PixelGrabber.
R.
"ak" <> a écrit dans le message de news:
bv5csk$ac4$...
> "Riri" <> schrieb im Newsbeitrag
> news:40157626$0$29086$...
> > Hello, i have an image, and i'd like to obtain a table in which i store

> RGB
> > values of each pixel, and then create an another image from a
> > MemoryImageSource using that table. I don't know how to manage it, any

> idea?
> >
> > Thanks
> > Melina
> >
> > Image image2 = getToolkit().getImage("D:/Temp/b.jpg");
> >
> > //Création du tableau pixel image et affichage
> > int w = 256;
> > int h = 256;
> > int pix[] = new int[w*h];
> > int index = 0;
> > for (int y = 0; y < h*w; y++) {
> > pix[index++] = ???
> > }
> > Image image = createImage(new MemoryImageSource(w, h, pix, 0, w));
> >
> >

> Look at PixelGrabber
> --
>
> ____________
>
> http://reader.imagero.com the best java image reader.
>
>



  Reply With Quote
Old 01-27-2004, 09:39 AM   #7
Riri
 
Posts: n/a
Default Re: Get RGB array from image

I do not need this kind of advice, i just need help in java!
Thanks
R.
"Andrew Thompson" <> a écrit dans le message de
news: JOgRb.29479$...
> "Riri" <> wrote in message
> news:4015931f$0$29080$...
> | Thanks but that's not helping me..
>
> It was meant to help you to help yourself.
> If you do not wish to do that, Elance
> might be a better option for you.
>
> --
> Andrew Thompson
> * http://www.PhySci.org/codes/ Web & IT help
> * http://www.PhySci.org/ PhySci software suite
> * http://www.1point1C.org/ 1.1C - Superluminal!
> * http://www.AThompson.info/andrew/ personal site
>
>



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump