We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to use this for image which is being fetched from online source, I am not looking for saving the file on disk before rotating.
The text was updated successfully, but these errors were encountered:
Written below code try { const resp = await fetch( imageurl ); if (resp.ok) { const imagebuffer = resp.arrayBuffer ? await resp.arrayBuffer() : await resp.buffer(); const extension = path.extname(imageurl); //fix image rotation try { var {buffer} = await jo.rotate(Buffer.from(imagebuffer), {quality:50});
return { height: 6.2,width: 4.85, data: buffer, extension: extension }; } catch (error) { console.log('An error occurred when rotating the file: ' + error); return { height: 6.2,width: 4.85, data: imagebuffer, extension: extension }; } }else{ return; } } catch (error) { console.log(error); return ; }
Sorry, something went wrong.
No branches or pull requests
How to use this for image which is being fetched from online source, I am not looking for saving the file on disk before rotating.
The text was updated successfully, but these errors were encountered: