Hi, Jay.
So you leaved the code which checks the full color including alpha, but
the source image does not have an alpha so the check for alpha is not strictly 
necessary.
May be we can use RGB only for JPEG and for all others we can use ARGB?

BTW Looking at this test I assume that it was expected that jpeg/gif images 
might be changed during DND operation,
 - so maybe DND of the argb image using jpeg format should drop the alpha 
channel?
 - or it should be somehow be reported as unsupported?
instead of thrown exception somewhere in DND code?

On 08/11/2018 01:13, Jayathirth D V wrote:
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:

http://cr.openjdk.java.net/~jdv/8176556/webrev.02/

Thanks,

Jay

*From:*Philip Race
*Sent:* Thursday, November 08, 2018 6:05 AM
*To:* Brian Burkhalter
*Cc:* awt-...@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 :-)

-phil.

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

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

    Brian



        On Nov 7, 2018, at 11:25 AM, Sergey Bylokhov <sergey.bylok...@oracle.com 
<mailto:sergey.bylok...@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?



--
Best regards, Sergey.

Reply via email to