mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Code quality changes, and added the possibility to set the amount of colors for the Quantizer.
This commit is contained in:
parent
3b1560390b
commit
77a92d98c3
92 changed files with 690 additions and 653 deletions
|
@ -225,14 +225,14 @@ namespace Greenshot.Drawing {
|
|||
|
||||
private int round(float f) {
|
||||
if(float.IsPositiveInfinity(f) || f>int.MaxValue/2) return int.MaxValue/2;
|
||||
else if (float.IsNegativeInfinity(f) || f<int.MinValue/2) return int.MinValue/2;
|
||||
if (float.IsNegativeInfinity(f) || f<int.MinValue/2) return int.MinValue/2;
|
||||
return (int)Math.Round(f);
|
||||
}
|
||||
|
||||
private int round(double d) {
|
||||
if(Double.IsPositiveInfinity(d) || d>int.MaxValue/2) return int.MaxValue/2;
|
||||
else if (Double.IsNegativeInfinity(d) || d<int.MinValue/2) return int.MinValue/2;
|
||||
else return (int)Math.Round(d);
|
||||
if (Double.IsNegativeInfinity(d) || d<int.MinValue/2) return int.MinValue/2;
|
||||
return (int)Math.Round(d);
|
||||
}
|
||||
|
||||
private bool accountForShadowChange = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue