jwagner/smartcrop-sharp

Support for using a readable stream

オープン

#6 opened on 2019/10/15

 (2 件のコメント) (2 件のリアクション) (0 人の担当者)JavaScript (14 件のフォーク)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (119 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド