Skip to content

Commit

Permalink
Bug fix rotate method jimp-dev#49: use max dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter Devolder committed Oct 15, 2015
1 parent c375447 commit 0d4cace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ function advancedRotate(deg, resize) {
this.bitmap.data.writeUInt32BE(this._background, idx);
});

var max = (this.bitmap.width > this.bitmap.height) ? this.bitmap.width : this.bitmap.height;
var max= Math.max(w,h,this.bitmap.width,this.bitmap.height)
this.resize(max, max);

this.blit(c, this.bitmap.width / 2 - c.bitmap.width / 2, this.bitmap.height / 2 - c.bitmap.height / 2);
Expand Down

0 comments on commit 0d4cace

Please sign in to comment.