poka.sh

Docs

WPG

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.

WordPerfect Graphics Preview.

At a glance

Purpose WordPerfect Graphics: a metafile of drawing records (lines, polygons, ellipses, curves, text and bitmaps), mostly vector, used for clip art.
Extensions .wpg
Poka parser poka-wpg
Viewer poka-vector-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B3 Core (see Breadth tiers)

How much Poka reads

B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-wpg/src/lib.rs (decode_wpg1 and decode_wpg2 record switches) and tests/samples.rs. The 5 corpus files render with at least one entity: 4 are WPG1 (libwpg_corpus_WPG1_COLOR256, libwpg_corpus_WPG1_ENGLAND, wp51_clipart_BALLOONS, WPG1_FROG) and 1 is WPG2 (imagemagick_perlmagick_input_v2.wpg). Drawings were not compared against libwpg. WPG1 covers lines, polylines, polygons, rectangles, ellipses and arcs, Bezier curves, text labels, bitmaps and the colour map. WPG2 covers polylines, rectangles, ellipses, bitmaps, solid pen and brush colours, pen width and the palette.

What Poka does not read

  • WPG2 text (text line, block and path records are skipped)
  • WPG2 curves (polyspline and polycurve) and compound polygons
  • WPG2 groups, layers and object capsules (layer visibility is not honoured)
  • WPG2 pen styles and dashes, line caps and joins, brush patterns and gradients, back colours
  • WPG2 transformed objects (the 'transformed object' records are skipped)
  • WPG1 dashed line styles and fill patterns (every non-zero style is drawn solid)
  • WPG1 text fonts, alignment and rotation (only colour and cell height are used)
  • PostScript and chart records
  • password-protected graphics (refused)

Background

PRONOM describes WPG as primarily vector but able to hold bitmaps, and records versions 1.0 and 2.0. Poka paints the records in file order as a 2D drawing. The record layouts follow libwpg, the decoder LibreOffice uses, which was also the oracle for the corpus check. Each bitmap's size is checked against the memory budget; one that does not fit is left out and the caption says why.

Versions

Version Identifier Poka Note
WPG 1 (WordPerfect 5.x clip art) FF 57 50 43 Read
WPG 2 (WordPerfect 6) FF 57 50 43 Partly read Both versions are handled in parsers/poka-wpg/src/lib.rs, but WPG 2 text, curves, compound polygons, groups, patterns and gradients are not decoded.

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

Sources