rawtopgm
Convert a raw greyscale image to a PGM image. tldr-pages
On several platforms
Several platforms
Convert a raw greyscale image to a PGM image
rawtopgm width height path/to/image.raw >path/to/output.pgmIdentifyConvert a raw greyscale image to a PGM image, assume the image to be a square
rawtopgm path/to/image.raw >path/to/output.pgmIdentifyConvert a raw greyscale image in which the pixels come bottom-first instead of top-first to a PGM image
rawtopgm width height -bottomfirst path/to/image.raw >path/to/output.pgmIdentifyIgnore the first n bytes of the specified file
rawtopgm width height -headerskip n path/to/image.raw >path/to/output.pgmIdentifyIgnore the last m bytes of each row in the specified file
rawtopgm width height -rowskip m path/to/image.raw >path/to/output.pgmIdentifySpecify the maxval for the grey values in the input to be equal to n
rawtopgm width height -maxval n path/to/image.raw >path/to/output.pgmIdentifySpecify the number of bytes that represent each sample in the input and that the byte-sequence is to be interpreted as little-endian
rawtopgm width height -bpp 1 -littleendian path/to/image.raw >path/to/output.pgmIdentify