Analiza klatek pikselowych i arkusz sprite’ów
Analizuje klatki pikselowe, gdzie każda klatka to blok wierszy, a klatki rozdziela wiersz z trzema myślnikami; symbole siatki opisuje paleta „symbol = #RRGGBB”. Sprawdza, że wszystkie klatki mają ten sam rozmiar, liczy niepuste piksele, ramkę otaczającą i użyte kolory, porównuje sąsiednie klatki liczbą zmienionych pikseli, wylicza czas trwania z liczby klatek i tempa, buduje układ arkusza sprite’ów z sufitem pierwiastka kwadratowego dla kolumn i zwraca arkusz jako przeskalowany PPM P3 wraz z podglądem ASCII każdej klatki.
Parses pixel frames where each frame is a block of rows and frames are separated by a line of three dashes; grid symbols are described by a palette of “symbol = #RRGGBB”. It checks that every frame has the same size, counts non-empty pixels, the bounding box and the colours used, compares neighbouring frames by the number of changed pixels, computes the duration from the frame count and rate, builds a sprite-sheet layout with the square root ceiling for columns and returns the sheet as a scaled PPM P3 together with an ASCII preview of every frame.