Skip to content
Permalink
Browse files

grey not gray

  • Loading branch information...
Jeremy Heminger Jeremy Heminger
Jeremy Heminger authored and Jeremy Heminger committed Apr 4, 2019
1 parent c76cd87 commit a02b7d072865a04b66a31e94b7395684ac4df08a
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/reducecolors.js
@@ -36,9 +36,9 @@ export class ReduceColors extends imagedata.ImageData {
* @param {Number} a strength
* @returns {Object}
* */
grayScale(a) {
greyScale(a) {
let params = {}
params.func = this.p_grayScale
params.func = this.p_greyScale
params.f = a
this.loopPixels({buffer:this.buffer,imgdata:this.imgdata},params)
.then(()=>{})
@@ -197,7 +197,7 @@ export class ReduceColors extends imagedata.ImageData {
* @param {Object} parameters
* @param {Object} reference the calling class
* */
p_grayScale(p,w,h,j,params) {
p_greyScale(p,w,h,j,params) {
p.buffer[j] = Math.floor(Math.round(params.f * p.buffer[j] / 255) * (255/params.f))
p.buffer[j+1] = Math.floor(Math.round(params.f * p.buffer[j] / 255) * (255/params.f))
p.buffer[j+2] = Math.floor(Math.round(params.f * p.buffer[j] / 255) * (255/params.f))

0 comments on commit a02b7d0

Please sign in to comment.
You can’t perform that action at this time.