• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

215
Views
Convert Base64 Image into LZW compressed TIFF images

i have a nodejs program that previously used sharp package to convert image to lzw compressed TIFF images as below. It gets the photo from s3 and converts to TIFF.

const image: Buffer = <Buffer>await this.s3Accessor.read(filePath); //download from aws s3 bucket
const tiff = await Sharp(image) 
      .tiff({
             compression: 'lzw',
       }).toBuffer();
return tiff.toString("base64"); //convert to tiff with lzw compression, use base64 string for API call

However, recently i introduced webpack to pack my lambdas, and sharp package is not compatible in webpack.

Is there any alternative package that can be used to convert images to tiff with lzw compression? I tried using JIMP, but it doesn't come with LZW compression and the TIFF file generated JIMP is just too huge compared to the one by Sharp

about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error