High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images
80
Build an image processing module that handles various rotation operations including EXIF-based auto-orientation, 90-degree rotations, and arbitrary angle rotations.
Automatically correct image orientation based on EXIF metadata.
Rotate images by multiples of 90 degrees clockwise without quality loss.
Rotate images by any angle with black background fill for empty areas.
Chain auto-orientation with additional rotation.
/**
* Reads an image and applies its EXIF orientation, then saves the corrected image.
* @param {string} inputPath - Path to the input image file
* @param {string} outputPath - Path where the corrected image will be saved
* @returns {Promise<void>} Promise that resolves when processing is complete
*/
async function autoOrient(inputPath, outputPath) {}
/**
* Rotates an image by 90 degrees clockwise, repeated multiple times.
* @param {string} inputPath - Path to the input image file
* @param {string} outputPath - Path where the rotated image will be saved
* @param {number} times - Number of times to rotate by 90° (e.g., 2 means 180°)
* @returns {Promise<void>} Promise that resolves when processing is complete
*/
async function rotate90(inputPath, outputPath, times) {}
/**
* Rotates an image by the specified angle in degrees.
* @param {string} inputPath - Path to the input image file
* @param {string} outputPath - Path where the rotated image will be saved
* @param {number} degrees - Angle in degrees (positive = clockwise, negative = counter-clockwise)
* @returns {Promise<void>} Promise that resolves when processing is complete
*/
async function rotateByAngle(inputPath, outputPath, degrees) {}
/**
* First auto-orients the image based on EXIF, then rotates by the specified angle.
* @param {string} inputPath - Path to the input image file
* @param {string} outputPath - Path where the processed image will be saved
* @param {number} degrees - Angle in degrees to rotate after auto-orientation
* @returns {Promise<void>} Promise that resolves when processing is complete
*/
async function autoOrientAndRotate(inputPath, outputPath, degrees) {}
module.exports = { autoOrient, rotate90, rotateByAngle, autoOrientAndRotate };Provides high-performance image processing capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-sharpdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10