Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:061375/Image-Manipulation

  • Loading branch information...
Jeremy Heminger Jeremy Heminger
Jeremy Heminger authored and Jeremy Heminger committed Apr 2, 2019
2 parents 588deb5 + 85ec2dc commit fbfb2fc19a52df20b2d567ee91be198b4f0f15cc
Showing with 33 additions and 0 deletions.
  1. +33 −0 README.md
@@ -13,6 +13,39 @@ Features I plan to add:
* Dithering
* More as I think of them

It's possible to chain effects together however, not in the normal manner.

**Ideally it should be something like:**

```javascript
test.load('image.jpg').effect({params}).anotherEffect({params}).drawBuffer()
```

But currently it's more clunky:

```javascript
test.load(['images/cat.jpg'])
.then(function(e){
test.draw(i,e[0].img)
test.loopPixels(test.getData(i),[{
f:test.nearestPixel,
params:{
i:j,
l:N,
ctx:test._ctx
}
},{
f:test.reduceColor,
params:{
f:4
}
}]).then(function(p) {
test.drawBuffer(p,j)
})
})
```

**04/01/2019** - Optimized the render process by utilizing the output buffer once operations were complete instead of updating the current pixel in each part of the loop. This is much faster and only uses about 10MB versus 40MB+ the old way.

**04/01/2019** - Added Grey Scale and reduce color effects

0 comments on commit fbfb2fc

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