jimp-dev/jimp

Efficient clone + crop (or contain)

开放

#847 创建于 2020年2月24日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (785 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (13,218 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Expected Behavior

Working on a Video Stream at 15fps I need to crop a part of each frame then resize it into a canvas using crop() or contain() that use crop underlaying

Current Behavior

It works but it use about 100ms to process a 720P video.

Failure Information (for bugs)

Not sure if it's a bug or a feature.

Actually I have to perform img.clone().crop() whereas it might be more efficient to add an option to crop() into a new image (the code would gather only the relevant pixels) ?

贡献者指南