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

Support for using a readable stream

Open roborourke opened this issue 6 years ago • 2 comments
trafficstars

It might just be something to add in the docs but is there any possible way to use this as part of a transformation stream? If I wanted to implement sharp in the following way for example:

const transform = sharp().rotate();
const smartcrop = smartcrop( result => {
  transform.extract( result.topCrop )
} )
readableStream.pipe( smartcrop ).pipe( transform ).pipe( writableStream );

No worries if it's difficult / impossible to support. I'm trying to make my service a less memory intensive for large files.

roborourke avatar Oct 15 '19 11:10 roborourke

It's definitely possible to support something like that but its not implemented.

jwagner avatar Oct 23 '19 17:10 jwagner

I would like this functionality, too 👍

ShaunEgan avatar Feb 12 '20 11:02 ShaunEgan