But .txt is not the same as .rs; yet .txt is not the same as .docx, although both of these files look the same to the human eye.

    • fbr@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      It’s pretty hard to break file types into these discrete categories. Images can be raw pixel colours (see ppm), losslessly compressed pixel data (see png), or lossily compressed pixel data (see jpeg).

    • MoonManKipper@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 days ago

      Depends on the file format. There is compressed and uncompressed audio - some times the numbers just represent the audio waveform (e.g. .wav) - some times with lossy lossless compression. Most, but not all, video formats are compressed due to the data size

    • Aniki@feddit.org
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      an image, technically, is an array of pixels. specifically a 2-dimensional array. this means, it’s just a long list of lists of pixels. so if you have a 1920x1080 image, it’s just a list of 1080 lists of 1920 pixels each.

      each pixel, again, is a tuple (i.e. a list with fixed length) of numbers which specify the brightness of red / green / blue lamp. so if you want to display a yellow pixel, the data would be (1.0, 1.0, 0.0) which turns red and green on and blue off.

      so if you have a 1920x1080 image, technically you have 1920*1080*3 ≈ 6 million numbers. each number takes 32-bit, you can read it here

    • iturnedintoanewt@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      There’s as many files as applications use. But just to make a point following your reasoning, you should include CAD, sliced and blender files at least to cover 3D objects.