• 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 ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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
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 ]
 
Bartender
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 :


    -Nate
     
    I'm sure glad that he's gone. Now I can read this tiny ad in peace!
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic