IntraCherche commented on pull request #93:
URL: https://github.com/apache/pdfbox/pull/93#issuecomment-752859592


   Because the code checks `if ((long) widthPx * (long) heightPx > 
Integer.MAX_VALUE)` and `widthPx` and `heightPx` are defined as
   
   `int widthPx = (int) Math.max(Math.floor(widthPt * scale), 1);
    int heightPx = (int) Math.max(Math.floor(heightPt * scale), 1);`
   
   But then the error message uses `widthPt` and `heightPt` (not `widthPx` and 
`heightPx` as in the if check). So if you rewrite the the if check (just to 
understand) with `widthPt` and `heightPt` instead of `widthPx` and `heightPx`, 
you get :
   `widthPx * heightPx = widthPt * scale * heightPt * scale` which in turn 
yields to `widthPt * heightPt * scale * scale ` or `widthPt * heightPt * scale 
^ 2` which is the proposed update.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to