• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Grabbing pixels

Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .

Shay Gaghe
[ January 16, 2002: Message edited by: Shay Gaghe ]
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :

    I can't beleive you just said that. Now I need to calm down with this tiny ad:
    the value of filler advertising in 2021
      Bookmark Topic Watch Topic
    • New Topic