openfaas / store

Official Function and Template Store for OpenFaaS
MIT License
162 stars 56 forks source link

Add caire image resizer as sample function. #36

Open alexellis opened 6 years ago

alexellis commented 6 years ago

I think we should add an image resizer into the store.

This one looks to have shot up to popularity with 8k stars: https://github.com/esimov/caire

It does smart things like scale/resize images while retaining the scale for faces, it can even extend the width of images etc.

Not sure of the best user interface, we could use a string like a human-readable sentence - or JSON as the input. JSON is obviously easier. Human-readable string may be: "Resize this URL https:// to 100 pixel width"

martindekov commented 6 years ago

It seems interesting, can I take a shot at this?

alexellis commented 6 years ago

Perhaps @esimov could take a look at it? My only concern is whether the resizing would time-out.

esimov commented 6 years ago

I will give it a try once i will came back from vacation. Is there a given timeout set for the returning function?

alexellis commented 6 years ago

Yes we can configure it. Most return in under 10s though. Enjoy your break

esimov commented 6 years ago

@alexellis i would opt for a json as an input source. What do you think?

alexellis commented 6 years ago

I think that might be a good choice. The users would just have to know how to input the data. Maybe we should extend the UI to create samples/examples of inputs?

esimov commented 6 years ago

Hey @alexellis i have integrated Caire as an OpenFaaS function. Here is the PR https://github.com/openfaas/store/pull/41. Please check it and let me know if something is missing or needs to be corrected.

psyhomb commented 5 years ago

It's definitely not powerful as caire but it is simple and it is written for OpenFaaS => https://github.com/openfaas/store/issues/74