-
-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
RinlovesYou edited this page Apr 22, 2021
·
4 revisions
An Overview of getting started using PPMLib. In this guide we'll focus on reading a .ppm file and its metadata.
var file = new PPMFile(); //initialize the PPMFile
file.LoadFrom("PATH_TO_FILE.ppm");
With this simple two-liner we now have the entire Flipnote loaded. Now we can read out all the metadata associated with it. For instance:
int framecount = file.FrameCount;
double framerate = file.FrameRate;
would give us the amount of frames the Flipnote has, along with the actual framerate, so if it was set to the fastest setting on creation, framerate
would now contain 30.0
meaning 30 FPS. This is useful when trying to create a video from a Flipnote, as you now can now infer how long the video would run.
If you would like to get the Framerate represented like they are in Flipnote Studio (1-8), you may find this value in the Sound Header.
int flipnoterate = file.Audio.SoundHeader.CurrentFramespeed;