MAC-PIX(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… MAC-PIX(1) β€” the mac-pix glow-up πŸ’…

okay so bestie, gather round, because this little icon mac-pix from the BRL-CAD fam is about to become your new favorite converter. it takes a dusty Apple Macintosh MacPaint bitmap and turns it into a pix(5) or bw(5) raster image. literally that's it. that's the whole gig. iconic behavior.


✨ SYNOPSIS ✨

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

like, yes, that's a lot of flags. no cap, we're getting to every single one. 🫢


🌸 DESCRIPTION 🌸

mac-pix reads an Apple Macintosh MacPaint bitmap β€” from file.mac, or, if you don't hand it a file, straight from standard input β€” and writes a BRL-CAD pix(5) or bw(5) raster image out to standard output. and yeah, that output must be redirected. it's not gonna politely ask where to put things. πŸŽ€

the defaults, so you know what you're walking into:

  • the input bitmap is assumed to be 720x576 (that's the standard MacPaint resolution, bestie, respect the classics)
  • the output pix(5) image defaults to 1024x1024
  • the input gets placed at the lower-left corner
  • active ("on") pixels default to white (R=G=B=255)
  • inactive pixels and any border are black

it's giving minimalist. it's giving high contrast. we love her. πŸ–€πŸ€


πŸ’… OPTIONS πŸ’…

  • -c β€” centers the input image inside the output image instead of yeeting it into the lower-left corner. main character energy, centered, as she should be. πŸ‘‘
  • -l β€” tracks the input size: sets the output width and height to 0 so they just assume the input dimensions. no forcing, just vibes. ✨
  • -b β€” outputs a single-channel bw(5) image instead of the default color pix(5). minimalist queen. πŸ–€
  • -s squareMacSize β€” sets both the input width and height to the given number of pixels. one number, both dimensions, efficient. πŸŽ€
  • -w Mac_width β€” sets the input width in pixels (default 720, clamped to 720). note the clamp, bestie, it will not let you go over. 🫢
  • -n Mac_height β€” sets the input height in pixels (default 576, clamped to 576). same deal, clamped at 576. πŸ’€
  • -x Mac_xoff β€” horizontal (X) offset into the input bitmap at which reading begins. like starting a book on chapter two. πŸ“–
  • -y Mac_yoff β€” vertical (Y) offset into the input bitmap at which reading begins. πŸ“–
  • -X output_xoff β€” adds a horizontal (X) offset to where the input is placed in the output. a little nudge to the side. πŸ‘‰
  • -Y output_yoff β€” adds a vertical (Y) offset to where the input is placed in the output. a little nudge up or down. πŸ‘†
  • -S squareOutputSize β€” sets both the output width and height to the given number of pixels. square output, square life. ⬜
  • -W output_width β€” sets the output width in pixels (default 1024). πŸ¦‹
  • -N output_height β€” sets 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. like, 255/0/0 gives you red. yes the slashes are mandatory. no we don't use commas. 🌈
  • -h, -? β€” prints a usage message and dips. ✌️

πŸŽ€ EXAMPLES πŸŽ€

Example 1. Convert a MacPaint document, centering it on a default canvas

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). slay. centered. camera-ready. πŸ“Έ

Example 2. Recolor and trim a MacPaint bitmap to its native size

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 (\text{chef's kiss}), and pipes it through pix-png(1) to get a PNG for sharing. red on black is such a serve, honestly. πŸ”₯❀️‍πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

brlcad(1), pix-fb(1), pix-png(1), pixmerge(1), pixbackgnd(1), pix(5), bw(5)

go read them. iykyk. πŸ“š


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team β€” absolute legends, fr fr. 🫢


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

okay but like, if you find a bug, tell them nicely. they're doing their best. and they built a whole CAD system so honestly, respect. πŸ’–

and that's the whole page, bestie! ✨ this one came to you from BRL-CAD in the MAC-PIX(1) manual β€” go forth and convert those MacPaint bitmaps, you gorgeous nerd you. πŸ§šπŸ’…πŸŒΈ

πŸ“¦ where this page comes from