[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8166038 BufferedImage methods getTileGridXOffset() and getTileGridYOffset(
From:       Martin Desruisseaux <martin.desruisseaux () geomatys ! com>
Date:       2020-05-16 8:28:26
Message-ID: 729bbaf9-8c2e-a312-6a09-fdbf843bf08b () geomatys ! com
[Download RAW message or body]

Hello Jay

Le 16/05/2020 à 06:33, Jayathirth D v a écrit :

> Apologies for late reply(mail got lost and I forgot about checking it).

No problem, thanks for the reply. In the meantime I have sent an updated 
version of the test case to Sergey, with test for arbitrary 
RenderedImage as a separated method.


> I was under the impression that we have another implementation of 
> RenderedImage which we can use, but looks like there are none.

I have found in Java2D source code that SunGraphics2D.getTileIndex(int, 
int, int) method is using the same formula than JAI. Consequently I 
think it is possible to demonstrate BufferedImage problem by wrapping it 
behind another RenderedImage (just delegating all method calls to the 
wrapped BufferedImage) for forcing SunGraphics2D to execute the general 
case instead that its optimizations for BufferedImage special case. That 
test would demonstrate that without the fix, attempt to draw a wrapped 
BufferedImage.subSubImage(…) with Graphics2D.drawRenderedImage(…) causes 
an IndexOutOfBoundsException to be thrown. Please let me know if such 
test is desired.

     Martin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic