mtgrosser / rszr

Fast image resizer for Ruby
https://mtgrosser.github.io/rszr/resizing.html
MIT License
32 stars 1 forks source link

Greyscale? #20

Closed dshorthouse closed 9 months ago

dshorthouse commented 9 months ago

I see some color handling here, though am stumped if you could use these to convert a color image to greyscale. Is that possible? How might you do that?

mtgrosser commented 9 months ago

In order to do this, you would have to manipulate pixel data directly, which would be inefficient in Ruby. I therefore added a little C impl in 8d184e9, released as v1.5.0.

dshorthouse commented 9 months ago

That's awesome! Thank you so much for taking this on. With this feature, I can replace a for-fee cloud image service that was too rich for me. 😁

dshorthouse commented 9 months ago

Tested and works great!