thumb|DX Encoding Logo
frame|right|135 Film Cartridge with DX barcode (top) and DX CAS code. The CAS code shows this is (top row) ISO 125 film, (bottom row) 24 exposures, +3/−1 f-stop exposure tolerance. The DX barcode reads 017563, showing [[DX number 109-12, 24 exposures.]]
DX (Digital indeX) encoding is a standard for marking 35 mm and APS photographic film and film cartridges, originally introduced by Kodak in 1983. It includes multiple markings, which are a latent image barcode on the bottom edge of the film, below the sprocket holes, a conductive pattern on the cartridge used by automatic cameras, and a barcode on the cartridge read by photo-finishing machines.
The DX encoding system was incorporated into ANSI PH1.14, which provided standards for 135 film magazines for still picture cameras and was superseded by NAPM IT1.14 in 1994; it is now part of ISO standard 1007, whose latest revision was issued in 2000.
History
left|thumb|Codes on Kodak ISO 400 color negative film
In order to simplify the handling of 35 mm film in 135 format cartridges, Kodak introduced the DX encoding method on 3 January 1983. Pentax A3 / A3000, The seven-bit frame/half-frame number is called the "DXN" number (different than the "DX Number Part 1" and "DX Number Part 2"), and is an extension on the original DX edge code, patented by Eastman Kodak in 1990.
Some image processing software utilized by film scanners allow selection of film manufacturer and type to provide automatic color correction. Interpreting the DX film edge barcode may provide this information, permitting accurate color correction to be applied.
DX Camera Auto Sensing
[[File:Codage DX.jpg|thumb|right|upright=1.5|DX CAS code positions; this film is rated at ISO 400/27°, has a 24-exposure length, and an exposure tolerance of ±1 stops.
<ul>
<li>1: Ground</li>
<li>2–6: Film speed</li>
<li>7: Ground</li>
<li>8–10: Film length</li>
<li>11–12: Exposure latitude</li>
</ul>]]
The outside of film cartridges are marked with a DX Camera Auto Sensing (CAS) code readable by many cameras. Cameras can then automatically determine the film speed, number of exposures and exposure tolerance.
With 135 film cartridges, the DX Camera Auto Sensing code uses a 2×6 grid of rectangular contact areas on the side of the metal cartridge surface; these areas are either conductive (bare metal) or non-conductive (painted). The left-most area of both rows (with the spool post on the left) are common (ground) and are thus always bare metal. Electrical contacts in the camera read the bit pattern. Diagramatically (with spool post to the left):
{| class="wikitable"
|-
| bgcolor="#7fff7f" | G
| bgcolor="#ff7f7f" | S1
| bgcolor="#ff7f7f" | S2
| bgcolor="#ff7f7f" | S3
| bgcolor="#ff7f7f" | S4
| bgcolor="#ff7f7f" | S5
|-
| bgcolor="#7fff7f" | G
| bgcolor="#ffff7f" | L1
| bgcolor="#ffff7f" | L2
| bgcolor="#ffff7f" | L3
| bgcolor="#7fffff" | T1
| bgcolor="#7fffff" | T2
|}
In this scheme:
- "G" are the two common-ground contacts
- "Sx" are the film speed contacts
- "Lx" are the film length contacts
- "Tx" are the exposure tolerance contacts
Most cameras read the film speed only, which is in the first row. Some cameras aimed at the consumer market only read enough bits in the first row to distinguish the most common film speeds. For example, 100, 200, 400, and 800 can be distinguished by reading only S1, S2, and ground.
Film speed
The five bits after the ground contact in the top row can be encoded to a maximum of 32 different film speeds, but only the 24 speeds from ISO 25/15° to 5000/38°, inclusive, spaced in intervals of step, are used.
The film speed codes are in binary order if the first three bits (S1, S2, S3) are considered to identify a trio of film speeds and the last two bits (S4 and S5) are considered an adjustment of +0, +, or + stops within that trio. For example, ISO speed 25/15° is encoded as 00010, while 32/16° is 00001 and 40/17° is 00011. These share a common encoding of 000xx for the first three bits, differing only in the last two bits, so 000xx designates the trio of speeds (25-32-40). Similarly, the next group of three speeds are encoded 10010 (50/18°), 10001 (64/19°), and 10011 (80/20°); it is clear from examination these all (ISO 50-64-80) share the same 100xx encoding for the first three bits. By comparison to the preceding set of three speeds, the encoding for 25/15° (00010) and 50/18° (10010) have the same xxx10 encoding for the last two bits; likewise, 32/16° (00001) and 64/19° (10001) share the xxx01 encoding, which indicates + stop compared to the xxx10 encoding, and 40/17° (00011) and 80/20° (10011) share the xxx11 encoding, which indicates + stop compared to the xxx10 encoding.
Film length
In the second row, the first three bits represent eight possible film lengths, although in practice only 12, 20, 24 and 36 exposures are encoded.
Exposure tolerance
The remaining two bits of the second row give four ranges of exposure tolerance, or latitude.
The complete encoding scheme is illustrated in the truth table below using letters and color.
- "G" is ground.
- "T" means the contact is connected to ground.
- "F" means the contact is disconnected from ground.
<div>
{| class="wikitable" style="text-align:center;font-size:90%;"
|+Standard film speed encoding
! rowspan=2 | Film speed<br/>(ISO)
! colspan=6 | 1st row DX contacts
| style="font-size:15%;background:#448;" rowspan=10 |
! rowspan=2 | Film speed<br/>(ISO)
! colspan=6 | 1st row DX contacts
| style="font-size:15%;background:#448;" rowspan=10 |
! rowspan=2 | Film speed<br/>(ISO)
! colspan=6 | 1st row DX contacts
|-
| style="background:#7f7;" | G
| style="background:#f77;" | S1 || style="background:#f77;" | S2 || style="background:#f77;" | S3
| style="background:#f77;" | S4 || style="background:#f77;" | S5
| style="background:#7f7;" | G
| style="background:#f77;" | S1 || style="background:#f77;" | S2 || style="background:#f77;" | S3
| style="background:#f77;" | S4 || style="background:#f77;" | S5
| style="background:#7f7;" | G
| style="background:#f77;" | S1 || style="background:#f77;" | S2 || style="background:#f77;" | S3
| style="background:#f77;" | S4 || style="background:#f77;" | S5
|-
! 25/15°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 32/16°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 40/17°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 50/18°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 64/19°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 80/20°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 100/21°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 125/22°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 160/23°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 200/24°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 250/25°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 320/26°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 400/27°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 500/28°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 640/29°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 800/30°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 1000/31°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 1250/32°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 1600/33°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 2000/34°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 2500/35°
| style="background:#7f7;" | G
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|-
! 3200/36°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#000;color:#fff;" | F
! 4000/37°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#000;color:#fff;" | F || style="background:#fff;color:#000;" | T
! 5000/38°
| style="background:#7f7;" | G
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
| style="background:#fff;color:#000;" | T || style="background:#fff;color:#000;" | T
|}
</div>
<div style=display:inline-grid>
{| class="wikitable" style="text-align:center;font-size:90%;"
|+Custom film speed encoding
! rowspan=2 | ISO speed
! colspan=6 | 1st row DX contacts
|-
| style="background-color:#7fff7f;" | G
| style="background-color:#ff7f7f;" | S1
| style="background-color:#ff7f7f;" | S2
| style="background-color:#ff7f7f;" | S3
| style="background-color:#ff7f7f;" | S4
| style="background-color:#ff7f7f;" | S5
|-
! custom 1
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 2
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 3
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 4
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 5
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 6
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 7
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! custom 8
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|}
</div>
<div style=display:inline-grid>
{| class="wikitable" style="text-align:center;font-size:90%;"
|+Film length
! rowspan=2 | Exposures
! colspan=6 | 2nd row DX contacts
|-
| style="background-color:#7fff7f;" | G
| style="background-color:#ffff7f;" | L1
| style="background-color:#ffff7f;" | L2
| style="background-color:#ffff7f;" | L3
| style="background-color:#7fffff;" | T1
| style="background-color:#7fffff;" | T2
|-
! other
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 12
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 20
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 24
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 36
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 48
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 60
| style="background-color:#7fff7f;" | G
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|-
! 72
| style="background-color:#7fff7f;" | G
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
|}
</div>
<div style=display:inline-grid>
{| class="wikitable" style="text-align:center;font-size:90%;"
|+Exposure tolerance
|-
! rowspan=2 | Exposure tolerance<br/>(in f-stops)
! colspan=6 | 2nd row DX contacts
|-
| style="background-color:#7fff7f;" | G
| style="background-color:#ffff7f;" | L1
| style="background-color:#ffff7f;" | L2
| style="background-color:#ffff7f;" | L3
| style="background-color:#7fffff;" | T1
| style="background-color:#7fffff;" | T2
|-
! ±½
| style="background-color:#7fff7f;" | G
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#000000; color:#ffffff;" | F
|-
! ±1
| style="background-color:#7fff7f;" | G
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#000000; color:#ffffff;" | F
|-
! +2 −1
| style="background-color:#7fff7f;" | G
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#000000; color:#ffffff;" | F
| style="background-color:#ffffff; color:#000000;" | T
|-
! +3 −1
| style="background-color:#7fff7f;" | G
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#7f7f7f;" |
| style="background-color:#ffffff; color:#000000;" | T
| style="background-color:#ffffff; color:#000000;" | T
|}
</references>
