Simple image manipulation (darken) that works on workers

Hello,

I need to darken an image before running it through OCR, however I have not found a way to do this on workers. I was messing with it locally using the sharp package, however I realized this package is not compatable with workers.

I'm wanting to put it in an existing cron worker that puts the data into KV after. I already have it putting other data related to the image, so it makes sense to do it there too. I'm planning on just using google's OCR api since it seems to be the best.

Is there a similar one that does? The only thing I need to do is to darken the image so that OCR doesnt pick up on random details that I dont need (I just want it to read the big white text in the image)

Thank you in advance
Was this page helpful?