jwagner/smartcrop-sharp

Support for using a readable stream

開放

#6 建立於 2019年10月15日

 (2 則留言) (2 個反應) (0 位負責人)JavaScript (14 個分叉)github user discovery
enhancementhelp wanted

倉庫指標

星標
 (119 顆星)
PR 合併指標
 (30 天內沒有已合併 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.

貢獻者指南