Skip to content

Commit

Permalink
fix: mistaken version of interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vectronic committed Nov 13, 2020
1 parent 7460582 commit 0a18804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ declare module "@vingle/bmp-js" {
height: number;
}, fromRGBA?: boolean): Buffer;

export function decode(buf: Buffer, toRGBA?: boolean): Bitmap;
export function decode(buf: Buffer): Bitmap;
}
4 changes: 2 additions & 2 deletions lib/encoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*
*/

function BmpEncoder(imgData, fromRGBA){
function BmpEncoder(imgData){
this.buffer = imgData.data;

this.fromRGBA = !!fromRGBA;
this.fromRGBA = !!imgData.fromRGBA;
this.width = imgData.width;
this.height = imgData.height;
this.extraBytes = this.width%4;
Expand Down

0 comments on commit 0a18804

Please sign in to comment.