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

REG: Transfer of translucent images across JVM through sys clipboard distorts the image, XToolkit



    • Cause Known
    • x86
    • linux_suse_sles_10


      I am creating a buffered image of type TYPE_INT_ARGB and rendering a rectangle into it at the center. I have implemented my own transferable and I have copied the image into the system clipboard. I am opening another application in a separate JVM and getting all the supported data flavors for the transferable object available in the system clipboard.

      On XToolkit, I am getting 5 data flavors as supported - image/gif, image/jpg, image/png, image/x-png and java Image object. For the first 4 data flavors, the representation class is an input stream. I am using all these flavors and trying to read the image from the input stream using ImageIO. When I use the GIF flavor, the output image is not same as what was copied and it is totally different.

      This is reproducible on JDK6-b59d with XToolkit. This is not reproducible on Tiger-FCS and JDK6-b36 on XToolkit, where GIF flavor is not returned as supported. This is not reproducible on Win32 (only java image flavor is returned). Hence this is a regression introduced somewhere in-between b37 to b59d. This is seen only for translucent images and not seen for opaque images. I reproduced it on SolSparc10-JDS and SuSE10.

      I have attached 2 tests - one transmitter and one receiver. Run the app - ImageTransferTest on one JVM. A frame would appear with an image and 2 buttons. Click on the 'Copy' button. Open another JVM and run 'ImageTransferReceiverTest'. Click on the 'Paste' button (Make sure source app is also running). 5 images will be loaded on to the receiver frame. If the first image is different from the rest, the bug is reproduced.


        Issue Links



              denis Denis Fokin (Inactive)
              pmohansunw Praveen Mohan (Inactive)
              0 Vote for this issue
              0 Start watching this issue