lib/tufu.js
function Tufu(src){
	if(!(this instanceof Tufu)){
		return new Tufu(src);
	}
	this.src = src;
	var bufferData = fs.readFileSync(this.src);
	this.codec = Tufu.adaptCodec(bufferData);
	this.imageData = this.codec.decode(bufferData);
	//set image quality 100%
	this.quality = 100;
}
function Tufu(src){
	if(!(this instanceof Tufu)){
		return new Tufu(src);
	}
	this.src = src;
	var bufferData = fs.readFileSync(this.src);
	this.codec = Tufu.adaptCodec(bufferData);
	this.imageData = this.codec.decode(bufferData);
	//set image quality 100%
	this.quality = 100;
}
function Tufu ( src ) { if ( ! ( this instanceof Tufu ) ) { return new Tufu ( src ) ; } this . src = src ; var bufferData = fs . readFileSync ( this . src ) ; this . codec = Tufu . adaptCodec ( bufferData ) ; this . imageData = this . codec . decode ( bufferData ) ; //set image quality 100% this . quality = 100 ; }
start of Tufu
@param  {[String]} filePath
@return {[Tufu]} new instance Tufu
start of Tufu