• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading pixels from image  RSS feed

 
Clemens Brunnow
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, simple question.

I have a bmp image, which i'd like to load and then read the color values for each pixel and write it to an array.

does anybody know whether this is feasible?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clemens who wrote:


Please check your private messages for an important administrative matter.
 
Rob Camick
Ranch Foreman
Posts: 2822
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use ImageIO to read the image into a BufferedImage. You can then use the getRGB(...) method of buffered image.
 
Clemens Brunnow
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh i forgot to mention that this should happen clientwise.
ImageIO is not supported by GWT.

Any idea how I could realise it clientwise? Or do I have to do it by sending a request to the server?
 
Clemens Brunnow
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh i didnt realise that this has been moved.
This was actually a GWT question =)
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you did not mention it was GWT related, I moved it.

Like you rightly mentioned, GWT does not lend support to such operations.
You are left with essentially two options
1) Send the image to be processed onto the server
2) Use something like an applet embedded inside your GWT page. Of course you would need to sign the applet and the user still would need to give the applet permission to read from the disk.

I personally would go with #1
 
Clemens Brunnow
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay thank you for the reply

next time i will express myself more clearly
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!