CIFF
Specification on Image Data File
Version : 1.0 revision 4
Date : December 24, 1997
Copy right © 1997 Canon Inc.
CIFF Specification on Image Data File
ii
Revision history
CIFF Specification On Image Data File, Feb 12,1997 (Japanese)
CIFF Specification On Image Data File, May 12,1997 (English, this document)
Revision 2, July 1, 1997 ImageFormat, ImageSpec property became mandatory.
Revision 3, December 19, 1997 Following bugs have been corrected.
On page 24
kTC_ReleaseMethod has been corrected to kTC_SR_ReleaseMethod
kTC_releaseTiming has been corrected to kTC_SR_ReleaseTiming
Revision 4, December 24, 1997
On page 1
The name of this format is corrected to Camera Image File Format.
The storage orders of length and offset field in following figures are corrected.
On page 3 Fig : Heap
On page 5 Fig : HierarchicalHeap
On page 7 Fig : storage format = kInRecordEntry
On page 8 Fig : storage format = kInHeapSpace
Trade marks:
Windows and Visual C++ are either registered trademarks of Microsoft Corporation in
the United States and/or other countries.
CIFF Specification on Image Data File
iii
Table of Contents
1 Purpose of Document
__________________________________________ 1
2 Format Overview
_______________________________________________ 1
3 Structure of Document
__________________________________________ 1
4 The Fundamental Data Model
____________________________________ 2
4.1 Heap
___________________________________________________________ 3
4.1.1 heapLength________________________________________________________________ 3
4.1.2 offsetTblOffset (=heapSpaceLength)____________________________________________ 3
4.1.3 dataRecord ________________________________________________________________ 3
4.1.4 offsetTable ________________________________________________________________ 4
4.2 HierarchicalHeap
_________________________________________________ 4
4.3 Record Storage Method
__________________________________________ 5
4.3.1.1 storage format = kInRecordEntry : __________________________________________ 5
4.3.1.2 storage format = kInHeapSpace : ___________________________________________ 7
4.4 The Heap File Format
_____________________________________________ 8
4.4.1 Heap File Header(M) ________________________________________________________ 9
4.4.2 offsetTbl __________________________________________________________________ 9
4.4.2.1 typeCode _____________________________________________________________ 10
4.4.2.1.1 bit 15-14 type . stg _______________________________________________ 10
4.4.2.1.2 bit 13-11 type . dataType__________________________________________ 11
4.4.2.1.3 bit 10-0 type . IDCode ____________________________________________ 11
4.4.3 offsetTblOffset ____________________________________________________________ 11
4.4.4 Special Purpose Data Records ________________________________________________ 12
4.4.4.1 null record (M) ________________________________________________________ 12
4.4.4.2 free record (M) ________________________________________________________ 12
4.4.5 Concerning Data Alignment__________________________________________________ 12
5 File Format
___________________________________________________ 13
5.1 The Base File Set
_______________________________________________ 13
5.2 JPEG (Full View Image)
__________________________________________ 14
5.3 JPEG (Thumbnail Image)
________________________________________ 15
CIFF Specification on Image Data File
iv
5.4 ImageProps heap
______________________________________________ 16
5.4.1 ImageFormat (M)__________________________________________________________ 18
5.4.2 ImageSpec(M) ____________________________________________________________ 18
5.4.3 TargetImageType(R) _______________________________________________________ 19
5.4.4 RecordID ________________________________________________________________ 19
5.4.5 SerialNumber _____________________________________________________________ 20
5.4.6 CapturedTime(M)__________________________________________________________ 20
5.4.7 ImageFileName ___________________________________________________________ 21
5.4.8 ThumbnailFileName________________________________________________________ 21
5.4.9 Description_______________________________________________________________ 21
5.4.10 ShootingRecord heap ______________________________________________________ 21
5.4.10.1 ShootingRecord.ReleaseMethod(TBD)_____________________________________ 22
5.4.10.2 ShootingRecord.ReleaseTiming(TBD) _____________________________________ 22
5.4.10.3 ShootingRecord.SelfTimerTime(TBD)_____________________________________ 22
5.4.10.4 ShootingRecord.EF(TBD)_______________________________________________ 23
5.4.10.5 ShootingRecord.Exposure(R) ____________________________________________ 23
5.4.10.6 ShootingRecord.TargetDistanceSetting ____________________________________ 23
5.4.11 MeasuredInfo heap________________________________________________________ 24
5.4.11.1 MeasuredInfo.EV _____________________________________________________ 24
5.4.12 Camera heap(M)__________________________________________________________ 24
5.4.12.1 Camera.OwnerName(R) ________________________________________________ 24
5.4.12.2 Camera.ModelName(M) ________________________________________________ 25
5.4.12.3 Camera. CameraSpecification heap _______________________________________ 25
5.4.12.3.1 Camera. CameraSpecification. BodyID _____________________________ 25
5.4.12.3.2 Camera. CameraSpecification.BodySensitivity (TBD)_________________ 25
5.4.12.3.3 Camera. CameraSpecification.FirmwareVersion(R) __________________ 26
6 Decisions Concerning Extension
________________________________ 27
7 Verification of Compatibility
____________________________________ 28
8 Appendix
____________________________________________________ 28
8.1 Definitions of Fundamental Data Types
____________________________ 28
8.2 type.dataType and type.IDCode definition
__________________________ 29
CIFF Specification on Image Data File page 1
Copy right © 1997 Canon Inc.
1 Purpose of Document
This document describes the format (CIFF: Camera Image File Format) of the data-files generated by
Canon digital cameras.
2 Format Overview
The data format is defined so as to make it easy for the player (i.e., camera or host-computer application)
to play back the images and/or audio generated by the camera.
The format must be one that can easily be adopted into the currently existing market and infrastructure.
For this reason, the de facto standards of JFIF and WAVE are used, and the former has been extended
for use with digital cameras.
To support these extensions (i.e., the additional information specific to digital cameras that is added to
the JFIF file format[1], as described below), sample software shall be provided openly to player vendors.
By providing these samples, we can prevent the evolution of different "dialects" of the format.
As for the storage of additional information specific to digital cameras, attention was given to making it
easy for various manufacturers to add their own original extensions.
A digital camera is a device that produces multiple image and audio files. For this reason, in addition to
the contents of the individual files themselves, we also defined a system of organizing the location of files
to make it easy for a player to determine where each file is stored. This system is defined in a separate
document: "CIFF Specification on Directory/File organization and File Handling Protocol."
3 Structure of Document
In the separate "Fundamental Data Model" section, we define the data structure used to store the
digital-camera data (structure name: "heap")
[1] For information on the JFIF standard, see document "JPEG File Interchange Format version 1.01 Eric Hamilton C-Cube Microsystems
Dec. 10, 1991."
In the separate "File Format" section, we define the method used for storing the above-mentioned heap
within a JPEG[2] data stream, and the various attribute settings related to the photographed images.
In the separate "Decisions Concerning Extension" section, we define how various companies
participating in CIFF will go about adding to the standard to handle standard/common or independent