Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
d2fcb454
Commit
d2fcb454
authored
10 years ago
by
pkupczyk
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/source/java/ch/systemsx/cisd/common/image/MixColors.java
+6
-1
6 additions, 1 deletion
.../source/java/ch/systemsx/cisd/common/image/MixColors.java
with
6 additions
and
1 deletion
common/source/java/ch/systemsx/cisd/common/image/MixColors.java
+
6
−
1
View file @
d2fcb454
...
...
@@ -302,8 +302,13 @@ public class MixColors
}
}
final
float
whitePointFactor
=
255
f
/
getMaxComponent
(
whitePointColor
.
getRed
(),
whitePointColor
.
getGreen
(),
whitePointColor
.
getBlue
());
float
maxComponent
=
getMaxComponent
(
whitePointColor
.
getRed
(),
whitePointColor
.
getGreen
(),
whitePointColor
.
getBlue
());
float
whitePointFactor
=
1
;
if
(
maxComponent
!=
0
)
{
whitePointFactor
=
255
f
/
maxComponent
;
}
final
BufferedImage
mixed
=
new
BufferedImage
(
width
,
height
,
BufferedImage
.
TYPE_INT_RGB
);
// apply white point adjustments to the final image
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment