Gimp (Ubuntu) create raw binary 1 bit images

Gimp

  • Create new image, eg. 128*8 pixel
  • Draw one black dot to force the correct pallete
  • Image -> Mode -> Indexed -> Black and white 1-bit -> Convert
  • View -> Show grid
  • Image -> Configure grid -> 1px
  • Export as png

Convert to raw 1bit image with Image Magick

  • convert myimage.png -depth 1 GRAY:out.bin

Check binary data:

  • xxd -b -c 1 out.bin

Rotate 90° and negate:

  • convert myimage.png -depth 1 -negate -rotate 90 GRAY:out.bin