Skip to content

Commit

Permalink
Remove wheel drawing code from thumbnail endpoint to troubleshoot mal…
Browse files Browse the repository at this point in the history
…formed images
  • Loading branch information
gomander committed Jan 4, 2024
1 parent 6b55fdd commit f9bf530
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/server/Thumbnail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import WheelPainter from '$lib/server/WheelPainter'
import type Wheel from '$lib/utils/Wheel'

export const createThumbnail = async (wheel: Wheel) => {
const wheelPainter = new WheelPainter()
// const wheelPainter = new WheelPainter()
const canvas = createCanvas(300, 300)
const context = canvas.getContext('2d')
await wheelPainter.draw(context, wheel)
// const context = canvas.getContext('2d')
// await wheelPainter.draw(context, wheel)
return canvas.toBuffer('image/png')
}

0 comments on commit f9bf530

Please sign in to comment.