mtgrosser / rszr

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

Work with images in memory without reading/writing from disk #9

Closed fjaeger closed 3 years ago

fjaeger commented 3 years ago

It would be nice to be able to load images from memory directly without requiring to have the image file on disk first. Also reading the raw image data directly would be nice, e.g. for uploading it to S3

mtgrosser commented 3 years ago

The Imlib2 library is mainly file-oriented and doesn't provide a way of loading the undecoded image from a memory buffer. Therefore, the functionality would need to be implemented on the Ruby side of the gem, writing the memory buffer to a Tempfile. Currently, this local write cannot be avoided.

mtgrosser commented 3 years ago

Loading from and saving to memory supported as of v0.8.0