Skip to content

Commit

Permalink
fix dithering not being called
Browse files Browse the repository at this point in the history
  • Loading branch information
javl committed May 2, 2023
1 parent 8277482 commit 98c63e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const ConversionFunctions = {
return outputString;
},
};
settings.ConversionFunction = ConversionFunctions.horizontal1bit;
settings.conversionFunction = ConversionFunctions.horizontal1bit;

// An images collection with helper methods
function Images() {
Expand Down Expand Up @@ -458,7 +458,7 @@ function placeImage(_image) {
ctx.restore();

// Make sure the image is black and white
console.log('dithering: ', dithering);
console.log(settings.conversionFunction);
if (settings.conversionFunction === ConversionFunctions.horizontal1bit
|| settings.conversionFunction === ConversionFunctions.vertical1bit) {
dithering(ctx, canvas.width, canvas.height, settings.ditheringThreshold, settings.ditheringMode);
Expand Down

0 comments on commit 98c63e6

Please sign in to comment.