Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotation made by default when I load an image #1984

Closed
sami93 opened this issue Feb 8, 2022 · 2 comments
Closed

rotation made by default when I load an image #1984

sami93 opened this issue Feb 8, 2022 · 2 comments

Comments

@sami93
Copy link

sami93 commented Feb 8, 2022

Bug

I have a problem when I load some images uploaded from mobile device and when I load image with canvas I have the image that is made with rotation by default (while I have verified that there is no rotation in the original image)

Steps to Reproduce

import { createCanvas, loadImage } from 'canvas';
const img = await loadImage(pictureBuffer)
const canvas = createCanvas(img.width, img.height, 'pdf');
const ctx = canvas.getContext('2d')
ctx.drawImage(img, 0, 0, img.width, img.height)
const pdfBuffer = canvas.toBuffer('application/pdf');
// save pdf

Your Environment

  • Version of node-canvas: 2.9.0
  • node v14.15.3 on Mac OS X 12.2
@LinusU
Copy link
Collaborator

LinusU commented Feb 8, 2022

Seems like a duplicate of #1670?

@zbjornson
Copy link
Collaborator

@sami93 please read through #1670, and if that doesn't seem to be a duplicate, I'll reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants