fix tint
This commit is contained in:
parent
314099c9a6
commit
35749adf70
|
@ -30,6 +30,8 @@ public class Main {
|
|||
pict = stackViewer.push(UtilMatrix.blurGauss(pict, 3, 2));
|
||||
pict = stackViewer.push(UtilMatrix.sharpen(pict, 3));
|
||||
pict = stackViewer.push(UtilColor.tint(pict, new Color(255, 0, 0, 128)));
|
||||
pict = stackViewer.push(UtilColor.tint(pict, new Color(0, 255, 0, 0)));
|
||||
pict = stackViewer.push(UtilColor.tint(pict, new Color(0, 0, 255, 255)));
|
||||
pict.save(run.resolve("moscov.png"));
|
||||
stackViewer.repaint();
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class MColor {
|
|||
|
||||
//Alpha of tint is strength: 255 = equal to base, 0 = no effect
|
||||
public MColor tint(Color t) {
|
||||
double f = t.getAlpha() / 255d;
|
||||
double f = t.getAlpha() / 512d;
|
||||
this.mult(1 - f);
|
||||
r += t.getRed() * f;
|
||||
g += t.getGreen() * f;
|
||||
|
|
Reference in New Issue