Skip to content

Commit

Permalink
Merge pull request #9 from david-yappeter/master
Browse files Browse the repository at this point in the history
Fix Garbage character printed after printing Image
  • Loading branch information
hennedo authored Nov 14, 2022
2 parents f5b06cc + cd89124 commit 475ba14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitimage.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func printImage(img image.Image) (xL byte, xH byte, yL byte, yH byte, data []byt
printHeight := closestNDivisibleBy8(height)
bytes, _ := rasterize(printWidth, printHeight, &pixels)

return byte((width >> 3) & 0xff), byte(((width >> 3) >> 8) & 0xff), byte(height & 0xff), byte((height >> 8) & 0xff), bytes
return byte((printWidth >> 3) & 0xff), byte(((printWidth >> 3) >> 8) & 0xff), byte(printHeight & 0xff), byte((printHeight >> 8) & 0xff), bytes
}

func makeGrayscale(pixels *[][]pixel) {
Expand Down

0 comments on commit 475ba14

Please sign in to comment.