How to adjust output Quality and use other functions of ImageMagick with Magic-WASM? #159
-
First of all, it's an amazing tool. It works flawless with Workers. I am looking to adjust/reduce the quality of output image (JPEG). I tried following but it throws error
But it throws error as
I don't think this library is limited to only 4 functions as blur, resize, charcoal and rotate. If in case this library is limited to certain functions only, I couldn't find any list of all those functions other than 4 mentioned above. Actually I want to lower/reduce the quality of images maintaining their real image size as we would do with ImageMagic
How can we use other functions like crop and other effects |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The error message means that you are trying to execute something as a function that is not a function. This is happening because This library does not have all functions implemented but it's a lot more than |
Beta Was this translation helpful? Give feedback.
-
How did you get it to run on Workers? I tried everything but it will not function at all. |
Beta Was this translation helpful? Give feedback.
The error message means that you are trying to execute something as a function that is not a function. This is happening because
quality
is a property and not a function. You will need to doimage.quality = 40;
instead.This library does not have all functions implemented but it's a lot more than
4
. You can find which one are now implemented in this typescript file here: https://github.com/dlemstra/magick-wasm/blob/main/src/magick-image.ts