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

How can i have the coordinate on a buffered image ?

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i have the coordinate on a buffered image ?
i have these two coding, one is buffered image and the other is coordinate part.
How can i combine the coordinate part with the buffer image coding ?
The imageBrowser is coordinate part, the imagecapture is buffer image part. Kindly take a look on it.




 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you describe in words what you mean by "the coordinate on a buffered image"? What are the inputs, and what are the outputs? The code you posted is very thinly commented, and doesn't make clear what the end result should be.
 
motress zlting
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Can you describe in words what you mean by "the coordinate on a buffered image"? What are the inputs, and what are the outputs? The code you posted is very thinly commented, and doesn't make clear what the end result should be.



In the imagebrowse file, when mouse move over the image, wherever the mouse move on that image, the system will print the current coordinate. But i want to make use of this function to the buffer image....
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What stops you from adding the same MouseMotionListener to the ImageCapture object?
 
motress zlting
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:What stops you from adding the same MouseMotionListener to the ImageCapture object?



i have try to add mouselistener into imagecapture , but cannot work .....sobs...
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but cannot work .....


Why not? How did you do it, and what happened?
 
motress zlting
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:

but cannot work .....


Why not? How did you do it, and what happened?



i have combine 2 file, but the label keeps printing the coordinate on that image when mouse moved.
I don't want the label to print coordinate on image, i just want to print it in console.....How can i do this ? Help me take a look.

 
motress zlting
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe i need to start with easier part.
I want to start with this simple part.
How can i click on an buffered image and print out the coordinate ?
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't click on a BufferedImage, since a BufferedImage is only something in memory. You can catch a click on the component that is painting the image using a MouseListener, then translate the mouse location from relative to the component to relative to the image:
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic