mac-pix [-c] [-l] [-b] [-s _squareMacSize_] [-w _Mac_width_] [-n _Mac_height_]
[-x _Mac_xoff_] [-y _Mac_yoff_] [-X _output_xoff_] [-Y _output_yoff_]
[-S _squareOutputSize_] [-W _output_width_] [-N _output_height_]
[-C _r/g/b_] [_file.mac_] > _output.pix_
MAC-PIX(1)
NAME
mac-pix - convert an Apple MacPaint bitmap into a pix(5) or bw(5) raster image
On this page
SYNOPSIS
DESCRIPTION
mac-pix reads an Apple Macintosh MacPaint bitmap (from file.mac or, if no file is given, from standard input) and writes a BRL-CAD pix(5) or bw(5) raster image to standard output, which must be redirected.
By default the input bitmap is assumed to be 720x576 (standard MacPaint resolution) and the output pix(5) image defaults to 1024x1024, with the input placed at the lower-left corner. The default color for active ("on") pixels is white (R=G=B=255), and inactive pixels and any border are black.
OPTIONS
- -c
-
Center the input image within the output image instead of placing it at the lower-left corner.
- -l
-
Track the input size: set the output width and height to 0 so they assume the input dimensions.
- -b
-
Output a single-channel bw(5) image instead of the default color pix(5).
- -s squareMacSize
-
Set both the input width and height to the given number of pixels.
- -w Mac_width
-
Set the input width in pixels (default 720, clamped to 720).
- -n Mac_height
-
Set the input height in pixels (default 576, clamped to 576).
- -x Mac_xoff
-
Horizontal (X) offset into the input bitmap at which reading begins.
- -y Mac_yoff
-
Vertical (Y) offset into the input bitmap at which reading begins.
- -X output_xoff
-
Add a horizontal (X) offset to where the input is placed in the output.
- -Y output_yoff
-
Add a vertical (Y) offset to where the input is placed in the output.
- -S squareOutputSize
-
Set both the output width and height to the given number of pixels.
- -W output_width
-
Set the output width in pixels (default 1024).
- -N output_height
-
Set the output height in pixels (default 1024).
- -C r/g/b
-
Slash-separated red/green/blue intensities (each in [0..255]) for active ("on") pixels in the output (e.g. 255/0/0 for red).
- -h, -?
-
Print a usage message and exit.
EXAMPLES
mac-pix -c drawing.mac > drawing.pix
Reads drawing.mac and writes a 1024x1024 color pix(5) image with the artwork centered, ready to view with pix-fb(1) or compose with pixmerge(1).
mac-pix -l -C 255/0/0 drawing.mac | pix-png > drawing.png
Produces a red-on-black pix(5) image sized to the input dimensions and pipes it through pix-png(1) to obtain a PNG for sharing.
SEE ALSO
brlcad(1), pix-fb(1), pix-png(1), pixmerge(1), pixbackgnd(1), pix(5), bw(5)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org