[
https://issues.jboss.org/browse/JBSEAM-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marek Novotny resolved JBSEAM-4833.
-----------------------------------
Resolution: Done
> Erroneous integer divisions in Image.scaleToFit()
> -------------------------------------------------
>
> Key: JBSEAM-4833
> URL: https://issues.jboss.org/browse/JBSEAM-4833
> Project: Seam 2
> Issue Type: Bug
> Components: JSF Controls
> Affects Versions: 2.2.0.GA
> Reporter: Nicholas Oxhøj
> Assignee: Marek Novotny
> Priority: Minor
> Fix For: 2.3.0.ALPHA
>
>
> org.jboss.seam.ui.graphicImage.Image.scaleToFit(int height, int width) will
> most of the time just scale to the specified width, because it contains an
> error. The
> ratios are calculated using integer division and will most likely both be 0.
> Instead of
> float hratio = height/getHeight();
> float wratio = width/getWidth();
> it should be
> float hratio = (float) height/image.getHeight();
> float wratio = (float) width/image.getWidth();
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues