Ability to set frame X and Y position
BjarkeNL opened this issue · 1 comments
BjarkeNL commented
Thanks for a cool encoder - much faster than the others I've tried for Node so far, and very nice that it is as flexible as it is! :)
You can already set a frames width and height independently of the other frames, but the (x,y) position of a frame is hardcoded to (0,0). If would be nice to be able to specify the x and y positions for writeFrame. (for optimization reasons - it becomes faster to generate a GIF where only a small part of the image changes from frame to frame)
It could for example be part of the "opts" parameter, something like:
encoder.writeFrame(pixels8bit, width, height, {
...
x = 123,
y = 456
});
mattdesl commented
Good call ! Will accept a PR for that. :)