Did several changes and added some new functions

Hi,

I added some functions: split(), merge(), cvtColor(), equalizeHist(), as well as added options for the toBuffer() func (you can save as jpg, png and as well as jpegQuality and pngCompression), plus provided another option for the resize() func, as well as changed the rotate() function to handle better multiple of 90 degrees rotation.

Thanks.