# pbmtomacp - convert a PBM image to a MacPaint file - man(1) - [phpMan]

> **TLDR:** Convert a PBM image to a MacPaint file.
>
- Convert a PBM image to a MACP file:
  `pbmtomacp {{path/to/image.pbm}} > {{path/to/output.macp}}`
- Do not compress the output file:
  `pbmtomacp {{-n|-norle}} {{path/to/image.pbm}} > {{path/to/output.macp}}`

*Source: tldr-pages*

---

_Pbmtomacp_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)               General Commands Manual              _Pbmtomacp_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)

## NAME
       pbmtomacp - convert a PBM image to a MacPaint file


## SYNOPSIS
       **pbmtomacp **[**-left _**left_]

       [**-right _**right_]

       [**-top _**top_]

       [**-bottom _**bottom_]

       [_pbmfile_]

       All  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐
       stead of one to designate an option.  You may use either white space or equals signs  between
       an option name and its value.



## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pbmtomacp **reads a PBM image as input and produces a MacPaint file as output.

       If you do not specify _pbmfile_, **pbmtomacp **uses Standard Input.

        The  generated  file  is  only  the data fork of a picture.  You will need a program such as
       **mcvert **to generate a Macbinary or a BinHex file that contains the  necessary  information  to
       identify the file as a PNTG file to MacOS.



## OPTIONS
       In  addition  to  the options common to all programs based on libnetpbm (most notably **-quiet**,
       see [ Common Options](index.html#commonoptions) ), **pbmtomacp **recognizes the following command line options:




### -norle 
              Paint image it produces.  This output, while not normal, conforms to MacPaint specifi‐
              cations and can be read by any MacPaint decoder without any special settings.

              The only value of this option is testing and experimentation.  The option causes every
              output image to contain exactly 53072 bytes, which is the theoretical maximum size for
              a MacPaint image.

              Without **-norle**, MacPaint compresses the image as much as possible and the output  size
              depends on the nature of the input.


### -left  -right  -top -bottom 
              vert.  The default is the whole file.  If the specified image is too large for a  Mac‐
              Paint-file,  **pbmtomacp  **cuts the image to fit, starting at the specified top left cor‐
              ner.

              These options exist for backward compatibility with an  unfortunate  original  design.
              They  do the same thing that you can do in a more Netpbm-like way and more flexibly by
              processing the input through **pamcut**.




## SEE ALSO
       [**macptopbm**(1)](https://www.chedong.com/phpMan.php/man/macptopbm/1/markdown), [**ppmtopict**(1)](https://www.chedong.com/phpMan.php/man/ppmtopict/1/markdown), [**pamcut**(1)](https://www.chedong.com/phpMan.php/man/pamcut/1/markdown), [**pbm**(1)](https://www.chedong.com/phpMan.php/man/pbm/1/markdown), **mcvert **documentation


## HISTORY
       **pbmtomacp **was added to Netpbm in 1988, written by Douwe van der Schaaf  (...!mcvax!uvapsy!vd‐
       schaaf).

       In  2015,  Akira  Urushibata  replaced  the program with the current version, using different
       logic and none of the original code.  The new version used the "packed PBM" facilities of the
       Netpbm library and the shhopt method of command line parsing.

## DOCUMENT SOURCE
       This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pbmtomacp.html>**

netpbm documentation                        26 April 2015                   _Pbmtomacp_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
