• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grabbing pixels

 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I�m developing a distributed application with RMI. The client will send an Image�s URL address to server, the server will load this image and grabs its pixels to an array, afterward the server will send the data array to the client, the client will create an image from this data array.
I tried to write piece of code that demonstrate this but it seem I misunderstanding here . I would like to receive a code that allows me to provide this idea .

Thanks
Shay Gaghe
[ January 16, 2002: Message edited by: Shay Gaghe ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay... I think I have it doing what you want... three things that I added or changed that helped :
  • Use a MediaTracker to load the Image... this way you can be sure that the Image is fully loaded before you mess with it.
  • Use a MemoryImageSource to build the Image from the pixel array.
  • The second error test in the importPix() method was wrong... I changed it to test the mask in the PixelGrabber's status against the ImageObserver.ABORT code.


  • Here's the code :


    -Nate
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic