Skip to content
Snippets Groups Projects
Commit d2fcb454 authored by pkupczyk's avatar pkupczyk
Browse files

SSDM-363 : Fix/introduce dynamic range compression in screeining/imaging - eliminate division by 0

SVN: 31579
parent 96459788
No related branches found
No related tags found
No related merge requests found
......@@ -302,8 +302,13 @@ public class MixColors
}
}
final float whitePointFactor = 255f / getMaxComponent(whitePointColor.getRed(), whitePointColor.getGreen(), whitePointColor.getBlue());
float maxComponent = getMaxComponent(whitePointColor.getRed(), whitePointColor.getGreen(), whitePointColor.getBlue());
float whitePointFactor = 1;
if (maxComponent != 0)
{
whitePointFactor = 255f / maxComponent;
}
final BufferedImage mixed = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// apply white point adjustments to the final image
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment