Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.06 KB

project_file_format.md

File metadata and controls

32 lines (19 loc) · 1.06 KB

fSpy project file format

Binary file structure

An fSpy project file consists of the following parts in the following order, where uint32 is an unsigned 4 byte little endian integer:

  • file_id - 4 x uint8

    0x66, 0x73, 0x70, 0x79 (f, s, p, y in ASCII)

  • project_file_version - uint32

    1

  • state_size - uint32

    The size in bytes of the project state JSON data

  • image_size - uint32

    The size in bytes of the project image data. May be 0.

  • Project state data

    A state_size byte JSON string describing the project state

  • Image data

    image_size bytes of binary image data.

Project state data

The project state data describes the state of the entire fSpy project. Camera parameters are stored under the cameraParameters attribute. Note that the camera parameters can be null for example if the vanishing points are invalid.

Image data

The image data is a binary blob of image data. The fSpy code is not aware of the format of the data. As long as Electron can load it, it's considered valid.