On Wed, 30 Oct 2024 18:35:26 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/javafx/iio/javax/XImageLoader.java
>>  line 126:
>> 
>>> 124:             int imageHeight = reader.getHeight(imageIndex);
>>> 125:             int[] widthHeight = ImageTools.computeDimensions(
>>> 126:                 (int)(imageWidth * screenPixelScale), 
>>> (int)(imageHeight * screenPixelScale),
>> 
>> Again is there a possibility of overflow here?
>
> should it be `(int)` (~floor) or `(int)Math.round()` ?

`(int)` is truncating (flooring) the double value, and I think that is the 
correct thing to do.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1593#discussion_r1823243166

Reply via email to