[OpenJDK 2D-Dev] <AWT Dev> [12] RFR JDK-8176556: java/awt/dnd/ImageTransferTest/ImageTransferTest.java fails for JFIF

Jayathirth D V jayathirth.d.v at oracle.com
Thu Nov 8 09:13:09 UTC 2018

Hello All,


I am replying to the last mail in this thread.


>From the test case we can see that it is not strict about pixel data which was transferred during DnD. It is just making sure we are able to do DnD for all native image formats.

In test case ImageTransferer. areImagesIdentical() function we can see that for JPEG & GIF(lossy formats) they are ignoring the pixel data. 

And for all other image formats except PNG they are not checking alpha channel and only checking RGB data.

So I have simplified areImagesIdentical() function also.


I have verified this latest test case in Windows(native image flavours : PNG JFIF DIB ENHMETAFILE METAFILEPICT), Ubuntu(native image flavours : image/png image/x-png image/tiff image/gif PNG JFIF) & Mac(native image flavours : PNG JFIF TIFF) and it passes.


Please find updated webrev for review:






From: Philip Race 
Sent: Thursday, November 08, 2018 6:05 AM
To: Brian Burkhalter
Cc: awt-dev at openjdk.java.net; 2d-dev
Subject: Re: [OpenJDK 2D-Dev] <AWT Dev> [12] RFR JDK-8176556: java/awt/dnd/ImageTransferTest/ImageTransferTest.java fails for JFIF


Right. It supports alpha of 0 and 255, but nothing in between :-)


On 11/7/18, 12:41 PM, Brian Burkhalter wrote: 

GIF 89a supports a transparent color index in the palette. 



On Nov 7, 2018, at 11:25 AM, Sergey Bylokhov <HYPERLINK "mailto:Sergey.Bylokhov at oracle.com"Sergey.Bylokhov at oracle.com> wrote:


On more question about "image/gif" format, as far as I understand this format
do not support the alpha as well, then why it works w/o exceptions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20181108/18a09078/attachment.html>

More information about the 2d-dev mailing list