Skip to content

Commit

Permalink
Error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ge0rg3 committed Aug 28, 2019
1 parent d386bdd commit e048cb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/operations/ExtractLSB.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ class ExtractLSB extends Operation {
height = parsedImage.bitmap.height,
rgba = parsedImage.bitmap.data;

if (bit < 0 || bit > 7) {
throw new OperationError("Error: Bit argument must be between 0 and 7");
}

let i, combinedBinary = "";

if (pixelOrder === "Row") {
Expand Down

0 comments on commit e048cb7

Please sign in to comment.