Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image Processing Help

 
Betty Reynolds
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've designed an Applet using VAJ and am having difficulty with image processing. I'm primarily relying on beans to do most of the work, and was hoping to avoid the low level code associated with painting images.
I have a number of components already in my applet. I would like to add a series of images (gif files) that are stored within an image array in my bean. I've been using g.drawimage, but I have to generate my own code for the coordinates and it does not address the problem of what happens to the images when the window is resized. Does anyone know of any beans or combination of beans that will do the work for me? Can anyone suggest an approach? Thanks.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Betty,
I don't know of any component that will alter graphics that you have drawn. You are responsible for all the math (location, width, height, etc) to correctly redraw your images.
You might try using JLabel with the image sent to the constructor. The JLabel will be resized by the layout but I don't think that the image itself will be resized.
Good Luck,
Manfred.
 
Betty Reynolds
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manfred, but I found a way. It has to do with using the ImageGlyph constructor, but that's part of IBM's VAJ functionality, so not particularly useful information unless you're using this package. My approach still needs some refinement, but it's a good start. I probably spent as much time dinking around with the wiring as I would if I had coded and debugged it myself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic