Introduction
The Clock Interchange File Format (CIFF, extension .ciff) is a file format created to build clock designs in an easy way for portable electronic devices or embedded systems.
The main idea behind the design was to allow anyone with an image editor and a text editor to be able to create any sort of custom clock for a handheld electronic device like a smartphone or an iPod, or an embedded system. The format defines a straight forward image layering system to allow for a very simple implementation on the viewer application, specially thought for embedded systems.
A CIFF file is only the definition of a clock structure and must be included with the image files that make up each image layer of the clock.
Since the file format readers are intended to be very simple the file format has some rules that must be followed strictly.
Format Description
The first line is always:
# CIFF
This defines the file as a CIFF file.
Any line starting with the # character is treated as a comment and ignored until the end of the line.
All content is case insensitive, but using uppercase is preferred.
Basic rules
- Clocks are defined by a set of parameter lines.
- Each line starts with a letter that identifies the line's contents.
- Each parameter on the line is separated by a semicolon.
- No blank spaces are allowed on the line unless they are part of an image's filename.
- The order of the lines defines the order of the layers. The first line will be rendered first (bottom of the layer stack) and will usually be the background image.
Clock canvas details
By default the CIFF file is assumed to be created for the device's native resolution and a default black background color. This can be changed with the following line:
B;SizeX;SizeY;Red;Green;Blue