NOTE: Although it is possible to Import a 24bpp True Colour BMP as Unsigned 8-bit PCM across 3-channels, separating each of the image data's R, G, and B values into their own Audacity channel, the Export process will insist on mixing the file down to Stereo (2-channels). It may be possible to use a different file format to overcome this limitation, or to individually Export each channel and Recompose the R, G, and B Layers in GIMP.

Image to Audio:

Interpret raw image data as audio. Each pixel will become one audio sample. Apply an audio effect to the image, and see what happens!

  1. save image to raw format, 8 or 24 bpp
  2. Audacity: File - Import - Raw
    1. Encoding: Unsigned 8-bit PCM
    2. Byte Order: No or Big or raw value?
    3. Channels: 1 (8bpp) or 3 (24bpp)
    4. Start Offset: 0 or raw header size
    5. Amount: 100%
    6. Sample Rate: Choose! or raw_x = one line per second
  3. Each audio sample/frame should be one pixel (2.1)
  4. Effects!
  5. File - Export - Export Audio
  6. Cut header from BMP and insert at start of data file
  7. Rename file
  8. See the effects!

Audio to Image:

Interpret an audio stream as 8 bits per pixel (8bpp, 256 colour). The width X will be decided by you and the height Y will ve determined by that number and the length of the audio.

  1. Audacity: Mix as Mono (8bpp)
  2. Set the Audio Position display to show samples (not seconds, frames)
  3. Resample to rate = Desired image width:
  4. File - Export - Export Audio
  5. GIMP: Export As new raw or BMP with 8bpp (Mono) or 24bpp (3-channel)
  6. Cut header from BMP and insert at start of audio data file
  7. Rename file, open in GIMP
  8. See the audio!

NOTE: Windows BMP uses a Signed INT for width and height values. Negative height means that the image data is stored with the bottom line first (bottom-to-top, Cartesian) while a positive value means the opposite (top-to-bottom, normal). It is possible to reverse this by inverting the image vertically and changing the sign on the value, or using a different format.