Portable Bitmap

Portable Bitmap

Vorlage:Infobox Dateiformat/Wartung/Standard fehltVorlage:Infobox Dateiformat/Wartung/Website fehlt

Portable Bitmap
Gnome-mime-image-x-portable-bitmap.png
Dateiendung: .ppm, .pgm, .pbm, .pnm
MIME-Type: image/x-portable-bitmap
Magische Zahl:

50 31 oder 50 34 hex
P1 oder P4

Entwickelt von: Jef Poskanzer
Art: monochrome Rastergrafik

PBM (engl. Portable BitMap) ist ein Dateiformat zur Speicherung von Bilddaten.

Das PBM-Format wurde in den achtziger Jahren zur einfachen Übertragung von Bitmaps zwischen verschiedenen Rechnersystemen von Sun Microsystems entwickelt. Es kommt in zwei Varianten vor, ASCII und Binär.

Es ist im PBM-Format keine Farbtabelle vorgesehen. Das heißt, dass nicht festgelegt werden kann, aus welchen Farben das Bild besteht. Es kann nur eindeutig zwischen zwei unbekannten Farben unterschieden werden. In der Regel weisen Programme zur Bildbetrachtung der 0 weiß und der 1 schwarz zu. Je nach Anwendung kann die Zuordnung aber beliebig lauten.

Inhaltsverzeichnis

Aufbau einer PBM-Datei

ASCII-Format

  • als Whitespace sind das Leerzeichen, Tab, CR und LF erlaubt
  • Kommentare beginnen mit # und gehen bis zum Ende der Zeile (CR oder LF)
  • die Zeilen dürfen inklusive Whitespaces nicht länger als 70 Zeichen sein – zwischen zwei CR oder LF dürfen also nicht mehr als 70 Zeichen stehen.
  • alle Zahlen werden in ASCII-Kodierung in Dezimalschreibweise angegeben
  • Aufbau: P1 – Whitespace – Bildbreite – Whitespace – Bildhöhe – Whitespace – Bildinformationen (Whitespaces in der Bildinformation werden ignoriert (bis auf den Fakt, dass keine Zeile länger als 70 Zeichen sein darf); jeder Pixel wird durch das Zeichen 1 oder 0 für eine der beiden möglichen Farben repräsentiert)

Beispiel:

P1
# hallo.pbm
12 18
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 0 0 0 0 0
0 0 0 1 1 0 0 1 1 0 0 0
0 0 1 0 0 0 0 0 0 1 0 0
0 0 1 0 1 0 0 1 0 1 0 0
0 1 0 0 0 0 0 0 0 0 1 0
0 1 0 0 0 0 0 0 0 0 1 0
0 0 1 0 1 0 0 1 0 1 0 0
0 0 1 0 0 1 1 0 0 1 0 0
0 0 0 1 1 0 0 1 1 0 0 0
0 0 0 0 0 1 1 0 0 0 0 0
0 1 1 1 1 1 1 1 1 1 1 0
0 0 0 0 0 1 1 0 0 0 0 0
0 0 0 0 1 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 0 0 1 0 0
0 1 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0

Binär-Format

  • die Datei beginnt statt mit P1 mit P4
  • die Pixeldaten werden in binärer Form gespeichert (jeweils 8 Bit werden zu einen Byte zusammengefasst (höherwertige Bits zuerst), wobei jede Zeile mit einem neuen Byte beginnt)
  • innerhalb der Pixeldaten sind keine anderen Zeichen erlaubt (auch keine Zeilenumbrüche – die Regelung mit den 70 Zeichen gilt hier nicht)

Beispiel (in hexadezimaler Form):

50 34 0A
23 20 68 61 6C 6C 6F 2E 70 62 6D 0A
31 32 20 31 38 0A
00 0F 06 0F 19 8F 20 4F 29
4F 40 2F 40 2F 29 4F 26 4F
19 8F 06 0F 7F EF 06 0F 09
0F 10 8F 20 4F 40 2F 00 0F

Siehe auch

Weblinks


Wikimedia Foundation.

Игры ⚽ Поможем решить контрольную работу

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Portable bitmap — Portable pixmap Portable pixmap Extension de fichier .ppm, .pgm, .pbm, .pnm Type MIME image/x portable pixmap, graymap, bitmap, anymap all unofficial Développé par Jef Poskanzer Type de format Format de fichier graphique …   Wikipédia en Français

  • Portable anymap — Portable pixmap Расширение .ppm, .pgm, .pbm, .pnm MIME image/x portable pixmap, graymap, bitmap, anymap все неофициальные Разработан Джеф Посканзер Тип формата Графические форматы У этого термина сущ …   Википедия

  • Portable pixmap — Extension .ppm, .pgm, .pbm, .pnm Type MIME image/x portable pixmap, graymap, bitmap, anymap all unofficial Développé par Jef Poskanzer Type de format Format de fichier graphique Origine de XPM …   Wikipédia en Français

  • Portable anymap — Portable pixmap Portable pixmap Extension de fichier .ppm, .pgm, .pbm, .pnm Type MIME image/x portable pixmap, graymap, bitmap, anymap all unofficial Développé par Jef Poskanzer Type de format Format de fichier graphique …   Wikipédia en Français

  • Portable graymap — Portable pixmap Portable pixmap Extension de fichier .ppm, .pgm, .pbm, .pnm Type MIME image/x portable pixmap, graymap, bitmap, anymap all unofficial Développé par Jef Poskanzer Type de format Format de fichier graphique …   Wikipédia en Français

  • Bitmap — In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits , a spatially mapped array of …   Wikipedia

  • Portable Pixmap — Vorlage:Infobox Dateiformat/Wartung/Standard fehltVorlage:Infobox Dateiformat/Wartung/Website fehlt Portable Pixmap Dateiendung …   Deutsch Wikipedia

  • Portable Graymap — Name Portable GrayMap Abkürzung PGM Dateiendung .pgm Hersteller Sun Microsystems Farbraum Graustufen Farbtiefe 8 Bit 256 Graustufen ( …   Deutsch Wikipedia

  • Portable Network Graphics — PNG A PNG image with an 8 bit transparency channel (top). The same image is overlaid onto a checkered background (botto …   Wikipedia

  • Portable Network Grafics — Portable Network Graphics Dateiendung .png MIME Type image/png, image/x png …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”