Re: [OpenJDK 2D-Dev] Review request for JDK-8066904: NullPointerExcpetion when calling ImageIO.read() with corrupt BMP

2015-10-05 Thread Jayathirth D v

Hi Sergey,

Thanks for review.

Hello All,

I need one more review for this patch. Please review.

Thanks,
Jay

On 10/5/2015 7:01 PM, Sergey Bylokhov wrote:

Hi, Jay.
The fix looks fine to me.

On 05.10.15 13:17, Jayathirth D v wrote:

Hello All,

_Please review following fix in jdk9:_

_Bug:_ https://bugs.openjdk.java.net/browse/JDK-8066904/

_Webrev:_
http://cr.openjdk.java.net/~rchamyal/jay/8066904/webrev.00/ 



_Bug:_ NullPointerException when calling ImageIO.read(InputStream) with
corrupt BMP

_Root cause:_ Bits per pixel is zero in BMP header and because of which
sampleModel & colorModel are set to null in readHeader() of
BMPImageReader.java. This is causing "bdata" to be null in
read(imageIndex, ImageReadParam) which is referenced later.

_Solution:_ Bits per pixel cant be zero for BI_RGB compression type(no
compression). Cases where Bits per pixel is not supported needs to be
handled properly. So caught exceptions at relevant places.

Thanks,
Jay







Re: [OpenJDK 2D-Dev] Question: Area changes order of points

2015-10-05 Thread Sergey Bylokhov

Hello,
I think this question is related to java2d, correct alias cc.

On 24.09.15 12:53, Hruda, Steve wrote:

I use the java.awt.geom.Area class to clip a shape. Today I noticed that
new Area(Shape) changes the orientation of the shape, so that I get the
points of the Area counter-clockwise in every case.

The following test shows you my problem.

https://drive.google.com/file/d/0B7P_rknS1TWxVGJ6a3hBaElBTk0/view?usp=sharing

Is this a bug or do I something wrong?

Is there a trick to get the points in the correct order?



--
Best regards, Sergey.


[OpenJDK 2D-Dev] [9] Review request for 8137571 Linux HiDPI Graphics support

2015-10-05 Thread Alexander Scherbatiy


Hello,

Could you review the fix:
  bug: https://bugs.openjdk.java.net/browse/JDK-8137571
  webrev: http://cr.openjdk.java.net/~alexsch/8137571/webrev.00

  This is an initial part of the HiDPI Graphics support on Linux for 
the JEP 263: HiDPI Graphics on Windows and Linux

http://openjdk.java.net/jeps/263

  - scale factors are added to surface dates
  - window size and events coordinates are scaled on peer side
  - XRobotPeer mouseMove() and getRGBPixel() methods are updated
  - GDK_SCALE system variable is used to detect the scale factor in GTK+
  - "sun.java2d.uiScale.enabled", and "sun.java2d.uiScale" options are 
added for the testing purposes
  - some classes like LWWindowPeer, SurfaceManager, SunGraphics2D, 
DrawImage, SurfaceData are just the same as in the fix for HiDPI 
Graphics support on Windows


Thanks,
Alexandr.



Re: [OpenJDK 2D-Dev] Review request for JDK-8066904: NullPointerExcpetion when calling ImageIO.read() with corrupt BMP

2015-10-05 Thread Sergey Bylokhov

Hi, Jay.
The fix looks fine to me.

On 05.10.15 13:17, Jayathirth D v wrote:

Hello All,

_Please review following fix in jdk9:_

_Bug:_ https://bugs.openjdk.java.net/browse/JDK-8066904/

_Webrev:_
http://cr.openjdk.java.net/~rchamyal/jay/8066904/webrev.00/

_Bug:_ NullPointerException when calling ImageIO.read(InputStream) with
corrupt BMP

_Root cause:_ Bits per pixel is zero in BMP header and because of which
sampleModel & colorModel are set to null in readHeader() of
BMPImageReader.java. This is causing "bdata" to be null in
read(imageIndex, ImageReadParam) which is referenced later.

_Solution:_ Bits per pixel cant be zero for BI_RGB compression type(no
compression). Cases where Bits per pixel is not supported needs to be
handled properly. So caught exceptions at relevant places.

Thanks,
Jay



--
Best regards, Sergey.


Re: [OpenJDK 2D-Dev] RFR: 8138817: JNI warnings loading fonts on MacOSX

2015-10-05 Thread Sergey Bylokhov

Looks fine

On 02.10.15 23:43, Philip Race wrote:

Fix some JNI warnings.

http://cr.openjdk.java.net/~prr/8138817/
https://bugs.openjdk.java.net/browse/JDK-8138817

-phil.





--
Best regards, Sergey.


[OpenJDK 2D-Dev] Review request for JDK-8066904: NullPointerExcpetion when calling ImageIO.read() with corrupt BMP

2015-10-05 Thread Jayathirth D v

Hello All,

_Please review following fix in jdk9:_

_Bug:_ https://bugs.openjdk.java.net/browse/JDK-8066904/

_Webrev:_ http://cr.openjdk.java.net/~rchamyal/jay/8066904/webrev.00/ 



_Bug:_ NullPointerException when calling ImageIO.read(InputStream) with 
corrupt BMP


_Root cause:_ Bits per pixel is zero in BMP header and because of which 
sampleModel & colorModel are set to null in readHeader() of 
BMPImageReader.java. This is causing "bdata" to be null in 
read(imageIndex, ImageReadParam) which is referenced later.


_Solution:_ Bits per pixel cant be zero for BI_RGB compression type(no 
compression). Cases where Bits per pixel is not supported needs to be 
handled properly. So caught exceptions at relevant places.


Thanks,
Jay