Automattic / Automattic/node-canvas

Image tearing

Open
#1,990 3 comments 0 reactions 0 assignees View on GitHub
Needs more info
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

## Issue

[Image tearing in nodejs environment](https://github.com/fabricjs/fabric.js/issues/7663)

## Steps to Reproduce

```js
/**
* amazon California S3
* > https://diy-product-01.s3.us-west-1.amazonaws.com/test/1a664eadc339a30b1f467b0fce272582+(1).png
* alibabaCloud China OSS
* > https://diy-image-01.oss-cn-shenzhen.aliyuncs.com/large/1a664eadc339a30b1f467b0fce272582.png
*/

const url = 'https://diy-product-01.s3.us-west-1.amazonaws.com/test/1a664eadc339a30b1f467b0fce272582+(1).png'
//const url = 'https://diy-image-01.oss-cn-shenzhen.aliyuncs.com/large/1a664eadc339a30b1f467b0fce272582.png'

const { createCanvas, loadImage } = require('canvas')
const canvas = createCanvas(200, 200)
const ctx = canvas.getContext('2d')

// Draw cat with lime helmet
loadImage(url).then((image) => {
ctx.drawImage(image, 0, 0, 200, 200)
console.log('')
})

```

```html




Document

```

## Image tearing
![image](https://user-images.githubusercontent.com/51221758/153706113-8c512b7f-b90d-4a51-be3c-dee2ba14abc1.png)

## Your Environment
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`):
![image](https://user-images.githubusercontent.com/51221758/153705982-b86c3f6b-57be-47d1-a364-e76e95d6a259.png)
* Environment:
* node-version
![image](https://user-images.githubusercontent.com/51221758/153706013-f58c0dd6-f313-4c27-8009-a6bf678eec0e.png)
* windows-version
![image](https://user-images.githubusercontent.com/51221758/153706055-5d8bda21-7b0d-4953-b8fe-a9ade5e7fd37.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.