What is a JPC File?
A JPC file stores a JPEG 2000 codestream directly, generally without the metadata boxes supplied by a JP2 container. The same elementary stream is also distributed as .j2c or .j2k. These extensions name the same compressed JPEG 2000 image data, not separate file types.
How JPC Files work
JPC is another name for a standalone JPEG 2000 codestream, the part of the standard that holds the compressed image data, without the JP2 family’s outer boxes. Its main header carries the parameters a decoder needs to reconstruct samples, including image size, component count and precision, tile size, wavelet and quantization settings, and the organization of packets and quality layers. The standard treats the JP2 file format as an optional wrapper around this stream, so a codestream can be stored on its own or carried inside a different file format. What the codestream does not say is which color space its components are in; that description has to be implied by the application or supplied out of band.
Key facts
- 1
.jpc,.j2c, and.j2kall label the same thing, a bare JPEG 2000 codestream, and decoders such as OpenJPEG route all three to one codestream parser. The reliable test is the first four bytes,FF 4F FF 51, whereas a JP2 file starts with a 12-byte signature box. The registered media type isimage/j2c; its registration listsj2candj2kas extensions but notjpc. - 2A bare codestream carries no color space information. The
image/j2cregistration states that it is implied or provided out of band, and it is the JP2 wrapper that adds a required Colour Specification box. Software that is not told the color space falls back on a guess: OpenJPEG’sopj_decompress, for example, treats a three-component image as sYCC and converts it to RGB when the second component is horizontally subsampled and the first has equal horizontal and vertical sampling, and treats one or two components as greyscale. When color accuracy matters, get the actual color space or ICC profile from whoever produced the file and supply it to the application that reads it. Wrapping the stream in JP2 does not recover it: the Colour Specification box has to be written from that known value, either as an enumerated color space (sRGB, sYCC, or greyscale) or as a restricted ICC profile. - 3Dropping the JP2 wrapper removes the signature and File Type boxes, the JP2 Header with its color and resolution information, and optional XML, UUID, and intellectual-property boxes. It does not remove coding features: tile size is recorded in the SIZ marker segment and the number of quality layers, progression order, and wavelet settings in COD, all inside the codestream.
- 4A
.jpcsuffix does not guarantee a Part 1 stream. A codestream may use capabilities from any part of the JPEG 2000 family, such as High Throughput JPEG 2000, and declares what a decoder needs through itsRsizfield and CAP marker segment, so check those before assuming a given decoder can read the file.
When JPC Files matter
Imaging systems must route JPC files to decoders that support raw codestream input. If a workflow depends on embedded color, layout, or descriptive metadata, a bare JPC file may be insufficient.
How Transloadit helps with JPC Files
Transloadit’s supported image formats list includes JPC, J2C, and J2K, each described as JPEG-2000 Code Stream Syntax and marked as readable and writable for the ImageMagick-based Robots the list covers, such as /image/resize. The same list has a separate JP2 entry for the boxed file format, and the Robot’s format parameter selects the output format.
Format availability depends on the imagemagick_stack version a Step uses, so confirm the entry for your stack. The docs do not describe how color is interpreted for bare codestream input.
Explore Transloadit’s file formats & compression capabilities
Sources
- IANA media type registration: image/j2c
- Rec. ITU-T T.800 (06/2019) | ISO/IEC 15444-1: JPEG 2000 core coding system, Annex A (codestream syntax, Tables A.2 and A.3) and Annex I (JP2 file format, I.2.3 and I.5.3)
- RFC 3745: MIME Type Registrations for JPEG 2000 (ISO/IEC 15444)
- OpenJPEG v2.5.3 opj_decompress.c: extension mapping, signature detection, and color space fallback