• 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

Creating a BufferedImage of transparent image

 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

How to create bufferedImage of an image that has transparent pixels?
If do so:
tail=new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
Graphics tailContext = tail.createGraphics();
tailContext.drawImage(tailImage, 0, 0, null);

the whole image will be transparent.
and if so:
new BufferedImage(10, 10, BufferedImage.TYPE_INT_AGB);
the transparent parts will be black.
[ August 21, 2004: Message edited by: Juhan Voolaid ]
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have you tried setting alpha interpolation?
 
reply
    Bookmark Topic Watch Topic
  • New Topic