Results 1 to 3 of 3
  1. #1
    Lingerz is offline Member
    Join Date
    Sep 2009
    Posts
    21
    Rep Power
    0

    Default ImageIcon Transparency

    Hey there, I was just wondering if it's possible to half the transparency of an ImageIcon. Currently, I've got the opaque and the transparent versions of each icon in two different folders, but this could be wasting time and space.

    So, I'd like to know if there's any way I could half the transparency without making a separate transparent file.

    Answers would be appreciated, thanks for you time. :)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    12,995
    Blog Entries
    7
    Rep Power
    19

    Default

    Quote Originally Posted by Lingerz View Post
    Hey there, I was just wondering if it's possible to half the transparency of an ImageIcon. Currently, I've got the opaque and the transparent versions of each icon in two different folders, but this could be wasting time and space.

    So, I'd like to know if there's any way I could half the transparency without making a separate transparent file.

    Answers would be appreciated, thanks for you time. :)
    Copy your Image to a BufferedImage; the BufferedImage allows you to get and set raw ARGB values so you get the ARGB value and write back an A'RGB value where A' < A.

    kind regards,

    Jos

  3. #3
    Lingerz is offline Member
    Join Date
    Sep 2009
    Posts
    21
    Rep Power
    0

Similar Threads

  1. ImageIcon HELP!
    By ben1989 in forum New To Java
    Replies: 1
    Last Post: 05-05-2010, 08:48 PM
  2. send imageIcon over RMI
    By nadia in forum Advanced Java
    Replies: 4
    Last Post: 01-06-2009, 03:41 PM
  3. ImageIcon and size
    By wokena in forum Java 2D
    Replies: 3
    Last Post: 12-21-2008, 08:47 AM
  4. Setting an image's transparency?
    By aaroffl in forum AWT / Swing
    Replies: 1
    Last Post: 12-03-2008, 12:01 PM
  5. Replies: 0
    Last Post: 07-25-2008, 02:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •