PGMB_TO_PGMA
Convert binary PGM Graphics File to ASCII PGM Format
PGMB_TO_PGMA
is a C++ program which
converts a binary PGM file to ASCII PGM format.
Usage:
pgmb_to_pgma file1 file2
where
-
file1 is the name of an existing PGM file in binary format;
-
file2 is the name of the PGM file in ASCII format to
be created.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
PGMB_TO_PGMA is available in
a C++ version.
Related Data and Programs:
I2_BINARY_TO_ASCII
a C++ program which
converts a file of short int (I2) data from binary to ASCII format.
PGMA,
a data directory which
contains a description and examples of the ASCII PGM format.
PGMA_IO,
a C++ library which
reads and writes files in the ASCII PGM format.
PGMA_TO_PGMB,
a C++ program which
converts an ASCII PGM file to binary PGM format.
PGMB,
a data directory which
contains a description and examples of the binary PGM format.
PGMB_IO,
a C++ library which
reads and writes files in the binary PGM format.
Reference:
-
http://netpbm/sourceforge.net/
the NETPBM homepage.
Source Code:
List of Routines:
-
MAIN is the main program for PGMB_TO_PGMA.
-
CH_CAP capitalizes a single character.
-
PGMA_WRITE writes the header and data for an ASCII PGM file.
-
PGMA_WRITE_DATA writes the data for an ASCII PGM file.
-
PGMA_WRITE_HEADER writes the header of an ASCII PGM file.
-
PGMB_CHECK_DATA checks the data for a binary portable gray map file.
-
PGMB_READ reads the header and data from a binary portable gray map file.
-
PGMB_READ_DATA reads the data in a binary portable gray map file.
-
PGMB_READ_HEADER reads the header of a binary portable gray map file.
-
PGMB_TO_PGMA converts one PGMB file to PGMA format.
-
S_EQI reports whether two strings are equal, ignoring case.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_WORD_EXTRACT_FIRST extracts the first word from a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
UCVEC_TO_I4VEC converts a vector of UNSIGNED CHAR's to an I4VEC.
You can go up one level to
the C++ source codes.
Last revised on 30 March 2011.