You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varsharp=require('sharp');vari=sharp('image.png');i.embed()// works without embed.resize(100,100).background({r:0,g:0,b:0,a:0})// works with a:1.toBuffer(function(err,output,info){if(err){throwerr;}else{console.log("All good")}});
The error thrown is Error: linear: vector must have 1 or 2 elements
It works when 'embed()' is not used or the alpha channel in the background color is set to 1
Hi Lovell,
Sharp is failing to resize a png file with the following metadata:
To reproduce, please run the following:
The error thrown is
Error: linear: vector must have 1 or 2 elements
It works when 'embed()' is not used or the alpha channel in the background color is set to
1
I created a repo that showcases the issue and includes the b&w png file: https://github.com/janaz/sharp-png-issue
The text was updated successfully, but these errors were encountered: