sharp-loader icon indicating copy to clipboard operation
sharp-loader copied to clipboard

Let preset options be in the form: function(sharpImage) => sharpImage

Open mikestopcontinues opened this issue 8 years ago • 5 comments

This would allow the user full access to sharp transformations, and would even allow the use of third party transformations (openCV, for instance).

mikestopcontinues avatar Dec 02 '17 11:12 mikestopcontinues

Ah yes! Also an option 😄 I'm working on a hefty refactor right now which you can see in an open pull request I have going. I will see if I can find a way to work this in 🎉 It might be a little bit before I get around to finishing everything though, lots on the go 😞

Thanks for the feedback!

izaakschroeder avatar Dec 05 '17 07:12 izaakschroeder

Woohoo! The refactor is actually why I didn't submit a PR. In any case, I'm looking forward to it!

mikestopcontinues avatar Dec 05 '17 08:12 mikestopcontinues

Sorry for the big delay @mikestopcontinues . The refactor is pretty much in! 🎉 There's a little bit of work to do to get the ability to do more transformations, but not a lot. Everything is much cleaner now and you should have a clear point of entry to customize things. In particular processImage can be adjusted to run some kind of pre or post pass for processing. Note that because of another requirement for SSR (people want the generated info but not images) you have to walk a little carefully around what metadata you expect back out.

izaakschroeder avatar May 01 '18 10:05 izaakschroeder

Just took a look. Looks good! I'm in the process of moving countries, but I hope to send a PR your way sometime in June. Thanks!

mikestopcontinues avatar May 01 '18 15:05 mikestopcontinues

No problem! 😄Good luck with your move!

izaakschroeder avatar May 01 '18 21:05 izaakschroeder