• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Specifying Transparency in an Image

Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a game where I have a PNG image of several cells. I load the whole PNG into a BufferedImage and now I want to copy out specific regions of the larger graphic into their own Image objects.

The problem I hit is that I want the transparency preserved. Unfortunately, that's not happening. How can I create this Image (which I get by calling drawImage on the larger image into the smaller one) while getting the transparency info as well?

PS - This is known as "filmstripping" in game programming...but I can't find the answer elsewhere. :-(
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic