SDG
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
StarOffice Gallery Preview.
At a glance
| Purpose | A StarOffice and OpenOffice.org gallery file: the graphics of one gallery theme, stored next to its .thm index and .sdv draw objects. |
| Extensions | .sdg |
| Poka parser | poka-sdg |
| Viewer | poka-metadata-card-viewer |
| Depth tier | Metadata card (see Depth tiers) |
| Breadth tier | B4 Summary (see Breadth tiers) |
How much Poka reads
B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-sdg/src/lib.rs (SGA3 record split with validation, DIB thumbnail header, source URL) and tests/samples.rs over the single corpus file sg1.sdg (92 graphic records, all kind 1). No format documentation was found, so the layout rests on the parser and that one file. Output is a metadata card listing objects; no pixels are decoded.
What Poka does not read
- Thumbnail pixels (zlib-packed DIB header is read, the image is not shown)
- Metafile thumbnails (no size shown)
- Object kinds other than graphic (sounds, draw objects, links are reported by number only, none in the corpus)
- The graphics themselves (only the name and source URL of each object)
- Companion files: .thm theme index and .sdv draw objects are separate formats
- Object versions other than the one seen in the corpus (version 5)
Background
A .sdg is neither ZIP nor OLE2: it is a bare run of objects, each starting with the magic SGA3, with no container header and no length fields. Each object holds a thumbnail, usually a DIB whose pixels LibreOffice compresses with zlib, and the URL of the source graphic. Poka shows a metadata card per object: kind, thumbnail size and compression, and source URL. Candidate records are checked (a constant of 4, version and kind in range) and skipped when they fail, since the magic can occur inside compressed data. Only object kind 1, a graphic, is named; it is the only kind in the corpus.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| SGA3 gallery object, kind 1 (graphic) | SGA3 |
Partly read | Header and source URL; the thumbnail's pixels are not decoded. |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- libstaroffice (candidate; LGPL-2.1; C++; https://github.com/fosnola/libstaroffice) — Import filter for old StarOffice documents; README says for .sdg it only recovers bitmaps and ignores other objects (partial).
Sources
- parsers/poka-sdg/src/lib.rs