This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

updating an image with a new color and or content  RSS feed

 
Ronen Wolfson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
how can i update an image in an ImageIcon originating in a gif file.
i would like to perform the following changes:
1)i would like change a section (rectangular) containing a given color with another color.
2)i would like to change a section (rectangular)
with a section in another image (rectangular).
thanks for any assistance,
Ronen.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the java.awt.image.PixelGrabber to get the pixel data from your image, and java.awt.image.MemoryImageSource to rebuild an image from the modified pixel data...

-nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!