Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4720930

Copy/Paste images from outside apps should support transparency

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.2
    • 1.4.0
    • client-libs
    • mantis
    • x86
    • windows_2000
    • Verified



      Name: jk109818 Date: 07/25/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-
      b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000 [Version
      5.00.2195]


      A DESCRIPTION OF THE PROBLEM :
      Java 1.4 now supports copy/paste of images from outside apps via
      Transferable and DataFlavor.imageFlavor. However calling
      getTransferData(DataFlavor.imageFlavor) results in a BufferedImage
      object that does not contain alpha data:

      BufferedImage@444319:
      type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
      IntegerInterleavedRaster: width = 80 height = 50 #Bands = 3 xOff = 0 yOff = 0
      dataOffset[0] 0

      The means that if, for example a user copies a
      transparent gif from their browser and pastes it into a java app, the
      resulting image will not contain the alpha data, and I my testing, the
      transparent pixels are black.

      This shortcoming seriously
      undermines any claim of image copy/paste that could be made for a java
      application.

      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 158695)
      ======================================================================

            agerasimsunw Alexander Gerasimov (Inactive)
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: