![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@jimp/plugin-rotate
Advanced tools
@jimp/plugin-rotate is a plugin for the Jimp image processing library that provides functionality to rotate images. It allows users to rotate images by a specified number of degrees, either clockwise or counterclockwise.
Rotate Image
This feature allows you to rotate an image by a specified number of degrees. In this example, the image is rotated by 90 degrees and then saved to a new file.
const Jimp = require('jimp');
Jimp.read('path/to/image.jpg')
.then(image => {
return image.rotate(90) // rotate image by 90 degrees
.write('path/to/rotated-image.jpg'); // save
})
.catch(err => {
console.error(err);
});
Rotate Image with Background Color
This feature allows you to rotate an image by a specified number of degrees and fill the background with a specified color. In this example, the image is rotated by 45 degrees with a white background.
const Jimp = require('jimp');
Jimp.read('path/to/image.jpg')
.then(image => {
return image.rotate(45, false, 0xFFFFFFFF) // rotate image by 45 degrees with white background
.write('path/to/rotated-image.jpg'); // save
})
.catch(err => {
console.error(err);
});
Sharp is a high-performance image processing library that supports a wide range of image transformations, including rotation. It is known for its speed and efficiency, making it a popular choice for server-side image processing. Compared to @jimp/plugin-rotate, Sharp offers more advanced features and better performance.
GraphicsMagick (gm) is a powerful image processing library that provides a wide range of image manipulation capabilities, including rotation. It is a wrapper for the GraphicsMagick and ImageMagick tools, which are well-known for their robustness and versatility. Compared to @jimp/plugin-rotate, gm offers more comprehensive image processing functionalities.
lwip is a lightweight image processing library that supports basic image transformations, including rotation. It is designed to be simple and easy to use, making it suitable for small-scale image processing tasks. Compared to @jimp/plugin-rotate, lwip is more lightweight but may lack some of the advanced features offered by Jimp.
Rotate an image.
Rotates the image counter-clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.
FAQs
Unknown package
We found that @jimp/plugin-rotate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.