Remove the unused bpc parameter from, and update the signature of, the resizeRgbImage function in src/core/colorspace.js

This commit is contained in:
Jonas Jenwald 2018-06-11 17:25:36 +02:00
parent d1637056b3
commit 55199aa281

@ -22,15 +22,14 @@ var ColorSpace = (function ColorSpaceClosure() {
/** /**
* Resizes an RGB image with 3 components. * Resizes an RGB image with 3 components.
* @param {TypedArray} src - The source buffer. * @param {TypedArray} src - The source buffer.
* @param {Number} bpc - Number of bits per component. * @param {TypedArray} dest - The destination buffer.
* @param {Number} w1 - Original width. * @param {Number} w1 - Original width.
* @param {Number} h1 - Original height. * @param {Number} h1 - Original height.
* @param {Number} w2 - New width. * @param {Number} w2 - New width.
* @param {Number} h2 - New height. * @param {Number} h2 - New height.
* @param {Number} alpha01 - Size reserved for the alpha channel. * @param {Number} alpha01 - Size reserved for the alpha channel.
* @param {TypedArray} dest - The destination buffer.
*/ */
function resizeRgbImage(src, bpc, w1, h1, w2, h2, alpha01, dest) { function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) {
var COMPONENTS = 3; var COMPONENTS = 3;
alpha01 = alpha01 !== 1 ? 0 : alpha01; alpha01 = alpha01 !== 1 ? 0 : alpha01;
var xRatio = w1 / w2; var xRatio = w1 / w2;
@ -174,8 +173,8 @@ var ColorSpace = (function ColorSpaceClosure() {
if (rgbBuf) { if (rgbBuf) {
if (needsResizing) { if (needsResizing) {
resizeRgbImage(rgbBuf, bpc, originalWidth, originalHeight, resizeRgbImage(rgbBuf, dest, originalWidth, originalHeight,
width, height, alpha01, dest); width, height, alpha01);
} else { } else {
rgbPos = 0; rgbPos = 0;
destPos = 0; destPos = 0;