Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated saveframes functionality #33

Closed
wants to merge 2 commits into from

Conversation

innovationchef
Copy link

@innovationchef innovationchef commented Feb 17, 2018

Hey @Manindra29 ,
I have implemented the saveframe function as discussed in issue #31.
I updated the argument of the run() function from -
run(sketch_setup=None, sketch_draw=None, frame_rate=60)
to
run(sketch_setup=None, sketch_draw=None, frame_rate=60, save = False)
This will save the frames with file names 0 to n; where n is dependent on frame_rate.

We can merge the saved frames to create gifs, videos etc. Any suggestions?
Please let me know if I should change the framework of saveframe implementation.

@Manindra29
Copy link
Contributor

Hey,
We'd like saveFrame to match as much as possible with the processing api's saveFrame(). Can you write this as a function instead of a param for the run method?

@abhikpal
Copy link
Member

We'd like saveFrame to match as much as possible with the processing api's saveFrame(). Can you write this as a function instead of a param for the run method?

+1 for this, actually. It's also rarely the case that someone needs a global save_frame function.

@innovationchef
Copy link
Author

Yeah, I will fix it. Thanks, @Manindra29 for updating the project details. Now, I have got a clear idea of how p5py is expected to be built.

@innovationchef
Copy link
Author

I tried to keep it same as given in the docs. Could you please provide me with a link to SaveFrame() Java implementation Code?

@abhikpal
Copy link
Member

abhikpal commented Feb 24, 2018

I tried to keep it same as given in the docs. Could you please provide me with a link to SaveFrame() Java implementation Code?

Judging by a simple grep on the entire Processing code, this seems to be a good place to start: https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java

I haven't looked at the code in ages, but if I remember correctly, you will have to look around a bit before you get to the actual saveFrame() implementation.

Also, minor note: I haven't looked at the code in detail, but could we maybe rename the method to save_frame to be consistent with the Python conventions?

@abhikpal
Copy link
Member

Closing this as we've moved the backend to vispy and this PR relies on pyglet. Feel free to open if you reimplement this in vispy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants