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, 08: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, 08: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




Andrew Thompson
  Reply With Quote
Old 01-26-2004, 10: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
>
>





Riri
  Reply With Quote
Old 01-26-2004, 10: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




Andrew Thompson
  Reply With Quote
Old 01-27-2004, 10: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.




ak
  Reply With Quote
Old 01-27-2004, 10: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.
>
>





Riri
  Reply With Quote
Old 01-27-2004, 10: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
>
>





Riri
  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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco PIX 535 No bootable image in flash Dmitriy_K Hardware 1 11-22-2006 04:51 AM
DeepBurner Pro - IMAGE? Terry Pinnell DVD Video 2 04-28-2006 08:44 AM
Image acquires Criterion Goro DVD Video 2 08-04-2005 02:28 AM
Advantage of 4:3 hdtv over old 4:3 Adam Smith DVD Video 17 12-15-2003 07:25 PM
New Releases: Short Circuit, Kung Fu Series, Image Horror: Updated complete downloadbable R1 DVD DB & info lists Doug MacLean DVD Video 0 12-13-2003 05:31 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46