Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Remove buffers noAssert argument #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/png/chunks/tRNS.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ module.exports = {

for (i = 0, len = image.length; i < len; i += 8) {

index = image.readUInt16BE(i, false);
index = image.readUInt16BE(i);
if (isIndexed) {

alpha = colors[index].alpha;
Expand All @@ -218,8 +218,8 @@ module.exports = {
} else { // All other types

r = index;
g = image.readUInt16BE(i + 2, false);
b = image.readUInt16BE(i + 4, false);
g = image.readUInt16BE(i + 2);
b = image.readUInt16BE(i + 4);

alpha = this.findAlpha(r, g, b);

Expand Down
4 changes: 2 additions & 2 deletions lib/png/processor/interlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ Interlace.prototype._adam7 = function (data, width, height, revert) {
jump = ((row * width) + col) * 4;

if (revert) {
output.writeUInt32BE(data.readUInt32BE(sequential, true), jump, true);
output.writeUInt32BE(data.readUInt32BE(sequential), jump);
} else {
output.writeUInt32BE(data.readUInt32BE(jump, true), sequential, true);
output.writeUInt32BE(data.readUInt32BE(jump), sequential);
}

position += 4;
Expand Down