Bitmap/Read a PPM file: Difference between revisions

m
Fixed typo.
(Updated to work with Nim version 1.4; changed header parsing to conform to PPM specs; added integrity checks.)
m (Fixed typo.)
Line 1,384:
 
proc header(f: File): tuple[width, height: Index] =
## Read the header and retrunreturn the image width and height.
var state = waitingMagic
for (token, lastInLine) in f.tokens:
Anonymous user