Skip to content

Commit

Permalink
Fix error in Resize.resizeWidthInterpolatedRGBA
Browse files Browse the repository at this point in the history
  • Loading branch information
iwsfg committed Aug 15, 2016
1 parent b50a52e commit 65158a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Resize.prototype.resizeWidthInterpolatedRGBA = function (buffer) {
var secondWeight = 0;
var outputBuffer = this.widthBuffer;
//Handle for only one interpolation input being valid for start calculation:
for (var targetPosition = 0; weight < 1 / 3; targetPosition += 4, weight += ratioWeight) {
for (var targetPosition = 0; weight < 1 / 4; targetPosition += 4, weight += ratioWeight) {
for (finalOffset = targetPosition, pixelOffset = 0; finalOffset < this.widthPassResultSize; pixelOffset += this.originalWidthMultipliedByChannels, finalOffset += this.targetWidthMultipliedByChannels) {
outputBuffer[finalOffset] = buffer[pixelOffset];
outputBuffer[finalOffset + 1] = buffer[pixelOffset + 1];
Expand Down

0 comments on commit 65158a9

Please sign in to comment.