Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-1047

Improve support of transparent avatars

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.8
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      from forum post: http://www.igniterealtime.org/community/message/188635#188635

      I was investigating why an avatar image that has a transparent background changes to a black background when you save your VCard.

      Here is what I found.

      The GraphicUtils class has a method called convert, this method converts the java.awt.Image to a java.awt.image.BufferedImage.

      Existing Code:

      BufferedImage bi = new BufferedImage(im.getWidth(null), im.getHeight(null), BufferedImage.TYPE_INT_RGB);

      The BufferedImage.TYPE_INT_RGB does not support transparency, I changed it to BufferedImage.TYPE_INT_ARGB_PRE wich does support transparency and it works fine.

      My question is, is there a reason that the BufferedImage's imageType needs to be set to BufferedImage.TYPE_INT_RGB?

        Attachments

          Activity

            People

            Assignee:
            konstantin.zolotarev Konstantin Zolotarev
            Reporter:
            wroot wroot
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: