[Error: PNG decoding error] for every PNG image
IvanJov opened this issue · 3 comments
IvanJov commented
Hey,
Thanks for this awesome library!
I am having some problems with PNG images. It worked before, but for some reason, each time I want to upload PNG image today, it won't resize it and it throws [Error: PNG decoding error]
error.
This is code I use:
lwip.open( data, ext, function ( err, image ) {
if ( err ) {
return errorHandler( err );
}
image.batch()
.resize( 80, 80 )
.toBuffer( 'png', function ( err, buffer ) {
if ( err ) errorHandler( err );
params = {
buffer: buffer,
saveTo: finalPath
};
uploadImage( params );
});
});
}
This is working with any other format, but for some reason not with PNG. Thanks!
ryanvanderpol commented
+1
I'm seeing this problem with 95% of my PNGs. I switched to sharp and it works perfectly.
IvanJov commented
I wasn't able to fix this (I've even browsed C++ code in repo) so I migrated to https://github.com/oliver-moran/jimp . It works perfectly!
c0un7-z3r0 commented
+1 I see it with every .png in the project. On OSX I have no issue but on CentOS it fails