gif-frames icon indicating copy to clipboard operation
gif-frames copied to clipboard

How to render frame to img tag if outputType is jpg/jpeg

Open JasonBoy opened this issue 4 years ago • 2 comments

if I set outputType to some image instead of canvas, the return value is ContentStream, how Can I use it to render in <img/> tag?

JasonBoy avatar Nov 06 '20 06:11 JasonBoy

Hi @JasonBoy I faced with it too, you can try my fork https://github.com/nsfw-filter/gif-frames

I return ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData here https://github.com/nsfw-filter/save-pixels/commit/d93d42fdc5dcf7dc4500ea2f2e5c4e7289c27366

How to use for Node.js and Browsers https://github.com/infinitered/nsfwjs#classifygif

yzevm avatar Nov 16 '20 09:11 yzevm

@YegorZaremba , I was able to install everything as expected. But still I have my doubts how to use the frameData[0].getImage() as src for an tag.

By the way, if I install your fork, it wont pick up gif-frames in var gifFrames = require('gif-frames');

Thanks

nosed07 avatar Sep 27 '22 11:09 nosed07