pics.2bit.feed.photo

2bit.pics

Documentation

A single low-resolution photo. The core record of 2bit.pics. Its pixels live in `content`: a four-shade mono photo or a color trichrome, either one a stack of one or more 2bpp exposures whose planes sit in a blob rather than on the record. `image` and `colors` are what records written before `content` existed carry instead; a record carrying neither `content` nor `image` is not a photo, and this app's AppView refuses to write one and skips one arriving from the network rather than indexing a photo with nothing in it.

main record

A single low-resolution photo. The core record of 2bit.pics. Its pixels live in `content`: a four-shade mono photo or a color trichrome, either one a stack of one or more 2bpp exposures whose planes sit in a blob rather than on the record. `image` and `colors` are what records written before `content` existed carry instead; a record carrying neither `content` nor `image` is not a photo, and this app's AppView refuses to write one and skips one arriving from the network rather than indexing a photo with nothing in it.

Record Key tid Timestamp-based ID

Properties

alt string Optional

Alt text for accessibility.

maxLength: 3000 bytesmaxGraphemes: 300 graphemes
caption string Optional

Free-text caption. Any #hashtags in it are read out by this app's AppView and indexed there; nothing about them is stored on the record.

maxLength: 5000 bytesmaxGraphemes: 500 graphemes
colors array of integer Optional

Superseded by pics.2bit.image#mono `colors`, and written only alongside `image`. Four 24-bit RGB colors (0 to 0xFFFFFF) corresponding to 2bpp pixel values 0 through 3, where 0 is lightest and 3 is darkest.

maxLength: 4 itemsminLength: 4 items
content union Optional

The photo's pixels. Exactly one shape, so a photo is never two kinds at once. Optional only while records predating this field remain unmigrated - every record written from now on carries it. Readers should skip a $type they don't recognize rather than render it broken, so new kinds can be added without breaking older clients; this union must never be closed, for the same reason.

createdAt string datetime Required

When this photo record was published.

facets array of ref app.bsky.richtext.facet Optional

Annotations of `caption`, in the shape Bluesky uses for rich text - hashtags and mentions today, and whatever this app grows next. Byte offsets index the UTF-8 encoding of `caption`, not its characters. Written by the author's client rather than derived here: what a facet records is what the author meant by a run of their own text, which is theirs to say. This app's AppView refuses any facet whose range falls outside the caption, whose tag doesn't match the text it covers, or whose mention doesn't cover a handle - so an indexed tag or mention always corresponds to something actually written.

maxLength: 64 items
image bytes Optional

Superseded by `content`, and written only by records that predate it: 128x112 2bpp Game Boy Camera tile data, 16x14 tiles in row-major order, 16 bytes per tile (8 rows of low+high bit-plane bytes, MSB-first). Read together with `colors` it means exactly what a one-exposure pics.2bit.image#mono means, and this app reads it as one. Kept declared rather than deleted because HappyView extracts a record through its lexicon and keeps only the properties the schema names - dropping this would index every old photo with its pixels silently removed.

maxLength: 3584minLength: 3584
labels ref com.atproto.label.defs#selfLabels Optional

Self-applied content labels, set by the author. 2bit.pics writes any of porn/sexual/nudity/graphic-media, at most one of which is porn/sexual/nudity; clients blur or warn on labeled photos.

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "createdAt"
    ],
    "properties": {
      "alt": {
        "type": "string",
        "maxLength": 3000,
        "description": "Alt text for accessibility.",
        "maxGraphemes": 300
      },
      "image": {
        "type": "bytes",
        "maxLength": 3584,
        "minLength": 3584,
        "description": "Superseded by `content`, and written only by records that predate it: 128x112 2bpp Game Boy Camera tile data, 16x14 tiles in row-major order, 16 bytes per tile (8 rows of low+high bit-plane bytes, MSB-first). Read together with `colors` it means exactly what a one-exposure pics.2bit.image#mono means, and this app reads it as one. Kept declared rather than deleted because HappyView extracts a record through its lexicon and keeps only the properties the schema names - dropping this would index every old photo with its pixels silently removed."
      },
      "colors": {
        "type": "array",
        "items": {
          "type": "integer",
          "maximum": 16777215,
          "minimum": 0
        },
        "maxLength": 4,
        "minLength": 4,
        "description": "Superseded by pics.2bit.image#mono `colors`, and written only alongside `image`. Four 24-bit RGB colors (0 to 0xFFFFFF) corresponding to 2bpp pixel values 0 through 3, where 0 is lightest and 3 is darkest."
      },
      "facets": {
        "type": "array",
        "items": {
          "ref": "app.bsky.richtext.facet",
          "type": "ref"
        },
        "maxLength": 64,
        "description": "Annotations of `caption`, in the shape Bluesky uses for rich text - hashtags and mentions today, and whatever this app grows next. Byte offsets index the UTF-8 encoding of `caption`, not its characters. Written by the author's client rather than derived here: what a facet records is what the author meant by a run of their own text, which is theirs to say. This app's AppView refuses any facet whose range falls outside the caption, whose tag doesn't match the text it covers, or whose mention doesn't cover a handle - so an indexed tag or mention always corresponds to something actually written."
      },
      "labels": {
        "ref": "com.atproto.label.defs#selfLabels",
        "type": "ref",
        "description": "Self-applied content labels, set by the author. 2bit.pics writes any of porn/sexual/nudity/graphic-media, at most one of which is porn/sexual/nudity; clients blur or warn on labeled photos."
      },
      "caption": {
        "type": "string",
        "maxLength": 5000,
        "description": "Free-text caption. Any #hashtags in it are read out by this app's AppView and indexed there; nothing about them is stored on the record.",
        "maxGraphemes": 500
      },
      "content": {
        "refs": [
          "pics.2bit.image#mono",
          "pics.2bit.image#trichrome"
        ],
        "type": "union",
        "description": "The photo's pixels. Exactly one shape, so a photo is never two kinds at once. Optional only while records predating this field remain unmigrated - every record written from now on carries it. Readers should skip a $type they don't recognize rather than render it broken, so new kinds can be added without breaking older clients; this union must never be closed, for the same reason."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "When this photo record was published."
      }
    }
  },
  "description": "A single low-resolution photo. The core record of 2bit.pics. Its pixels live in `content`: a four-shade mono photo or a color trichrome, either one a stack of one or more 2bpp exposures whose planes sit in a blob rather than on the record. `image` and `colors` are what records written before `content` existed carry instead; a record carrying neither `content` nor `image` is not a photo, and this app's AppView refuses to write one and skips one arriving from the network rather than indexing a photo with nothing in it."
}

Lexicon Garden

@