Dobe-Solutions / sharp-heif-lambda-layer

Lambda layer for Sharp with HEIF support
MIT License
3 stars 0 forks source link

After using sharp-heif-lambda-layer not able to convert heic file to heif directly #1

Closed abbey007 closed 5 months ago

abbey007 commented 6 months ago

Hi there,

Thanks for making this lambda layer which is very helpful to me reading heic data using sharp. But i have an issue, i am not able to directly convert the heic file to heif format using sharp . I am getting below error

Error: heifsave: Unsupported compression at Sharp.toBuffer (/opt/nodejs/node_modules/sharp/lib/output.js:161:17) at resizeImage (file:///var/task/index.mjs:394:6) at compressAndUpload (file:///var/task/index.mjs:276:30) at async Runtime.handler (file:///var/task/index.mjs:120:7)

I have also tried to convert the heic image to png or webp and then convert it to heif but same error

Looking forward for your help

Thanks Abhijeet

Cruaier commented 6 months ago

Hi there, As stated in the Readme the layer currently only supports decoding therefore the error. I can have a look adding a flag to also build the libraries for encoding.

abbey007 commented 6 months ago

Hi

Thanks for your reply. When can I expect the new version for encoding. So I can able to convert heic directly to heif files .

I am stuck on this step from weeks and tried multiple things

On Tue, May 7, 2024, 18:40 Cruaier @.***> wrote:

Hi there, As stated in the Readme the layer currently only supports decoding therefore the error. I can have a look adding a flag to also build the libraries for encoding.

— Reply to this email directly, view it on GitHub https://github.com/Dobe-Solutions/sharp-heif-lambda-layer/issues/1#issuecomment-2098370501, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5X6O3J4PSXPR5D3SIL44DZBDHDFAVCNFSM6AAAAABHK2LTWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGM3TANJQGE . You are receiving this because you authored the thread.Message ID: @.***>

Cruaier commented 5 months ago

hi @abbey007,

I added some code to also support HEIF encoding. Please pay attention to the readme and some example code in the testing file (https://github.com/Dobe-Solutions/sharp-heif-lambda-layer/blob/main/test.mjs)