benwiley4000 / gif-frames

🖼 Extract frames from an animated GIF with pure JS
MIT License
170 stars 26 forks source link

added programmatic dissection of cumulatively rendered gifs #18

Open pnkfluffy opened 4 years ago

pnkfluffy commented 4 years ago

Removed cumulative option. I deleted the stuff that had to do with your cumulative rendering and just added the code from TrevorSundberg. Tested it on a few cumulative and non-cumulative gifs and it worked with no issue.

pnkfluffy commented 4 years ago

I apologize for being so clumsy with syntax standards, this was my first pull request I've made on an unfamiliar repository. I recently got some work that will keep me busy for these next few days, but I'll try to look over all of it and try to submit a more optimized and conforming pull request within this week!

benwiley4000 commented 4 years ago

No worries about the formatting! I definitely appreciate the PR, and my norm is to leave comments. Doesn't mean anything bad 😄.

BTW I've been thinking about my earlier comment:

  1. I think the new algorithm assumes all frames are collected. What we ought to do is collect all frames up to the highest frame index, and return those that are requested.

Actually what could be more efficient and skip unneeded computation, is to collect the frames beginning by iterating in reverse order. I actually have something in my head so I might suggest a code update to the PR later today, if you wouldn't mind.

pnkfluffy commented 4 years ago

Not at all, do your thing. Like I said, I'm busy for a few days, but I'll be back by mid/end-of-week to see where I can clean things up or help a bit more with this. Also, I just wanted to say thank you so much for this library! It was an integral part of my first webdev portfolio project which is the main thing I'm using to upwork contracts and apply for my first dev jobs right now. If your interested in seeing an integrated use case, i've got it hosted here https://reactiongifme.herokuapp.com/. Anyway, don't mean to shill, It's just been really transformational in my life opportunities recently and I'm super psyched about it.

On Mon, Apr 20, 2020 at 2:13 PM Ben Wiley notifications@github.com wrote:

No worries about the formatting! I definitely appreciate the PR, and my norm is to leave comments. Doesn't mean anything bad 😄.

BTW I've been thinking about my earlier comment:

  1. I think the new algorithm assumes all frames are collected. What we ought to do is collect all frames up to the highest frame index, and return those that are requested.

Actually what could be more efficient and skip unneeded computation, is to collect the frames beginning by iterating in reverse order. I actually have something in my head so I might suggest a code update to the PR later today, if you wouldn't mind.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benwiley4000/gif-frames/pull/18#issuecomment-616783253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIRCBZZ7UJWDIIZ3DP6VYLRNSUH3ANCNFSM4MMEUAYQ .

benwiley4000 commented 4 years ago

@pnkfluffy cool! The concept for your app seems cool from what I can see, but I wasn't able to try because the signup confirmation email got flagged as spam by Gmail and it won't let me click the link. Let me know if you get that sorted out.. thanks for sharing!

benwiley4000 commented 4 years ago

@pnkfluffy just kidding, I was able to get it to work in the desktop web version of gmail by bypassing the spam filter, but I got stuck in the app on this screen (there's no prompt to access the camera, and I don't see any JS console errors):

Screen Shot 2020-04-21 at 5 54 51 PM