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
Broken jpeg data when using toDataURL image/jpeg on 2.3.0 #1350
Comments
Hrm, works on Windows but confirmed broken on Ubuntu. Will look at today, thanks for reporting. |
zbjornson
added a commit
to zbjornson/node-canvas
that referenced
this issue
Jan 13, 2019
Was mixing vec.capacity() and vec.size(). With MSVC the vec's growth factor is 1.5 (same as what I'm using), so this bug didn't manifest. With glibc it's 2.0. Also had an off-by-one. Fixes Automattic#1350
zbjornson
added a commit
to zbjornson/node-canvas
that referenced
this issue
Jan 13, 2019
Was mixing vec.capacity() and vec.size(). With MSVC the vec's growth factor is 1.5 (same as what I'm using), so this bug didn't manifest. With glibc it's 2.0. Also had an off-by-one. Fixes Automattic#1350
Fix in #1352. BTW your last line is actually producing a PNG; you need |
Many thanks!! I've tested the changes in my projects test suit and it looks good here |
2.3.1 is being released with a fix for this 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue or Feature
The dataURL generated for image/jpeg seems broken on version 2.3.0. It works well on version 2.2.0.
Example: brokenjpeg.txt
Steps to Reproduce
Your Environment
Version of node-canvas (output of
npm list canvas
oryarn list canvas
):canvas@2.3.0
Environment (e.g. node 4.2.0 on Mac OS X 10.8):
node v10.15.0 on Ubuntu 18 LTS
build-essential is already the newest version (12.4ubuntu1).
libcairo2-dev is already the newest version (1.15.10-2).
libgif-dev is already the newest version (5.1.4-2).
libjpeg-dev is already the newest version (8c-2ubuntu8).
librsvg2-dev is already the newest version (2.40.20-2).
libpango1.0-dev is already the newest version (1.40.14-1ubuntu0.1).
The text was updated successfully, but these errors were encountered: