Example: bankruptcy

JPEG File Interchange Format

jpeg File Interchange FormatVersion 1, 1992 Eric HamiltonC-Cube Microsystems1778 McCarthy , CA 95035+1 408 944-6300 Fax: +1 408 944-6314E-mail: File Interchange FormatVersion a File Interchange FormatJPEG File Interchange Format is a minimal file Format which enables jpeg bitstreams tobe exchanged between a wide variety of platforms and applications. This minimal formatdoes not include any of the advanced features found in the TIFF jpeg specification or anyapplication specific file Format . Nor should it, for the only purpose of this simplified formatis to allow the exchange of jpeg compressed File Interchange Format features Uses jpeg compression Uses jpeg Interchange Format compressed image representation PC or Mac or Unix workstation compatible Standard color space: one or three components.

1 JPEG File Interchange Format Version 1.02 Why a File Interchange Format JPEG File Interchange Format is a minimal file format which enables JPEG bitstreams to

Tags:

  Interchange, Jpeg

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of JPEG File Interchange Format

1 jpeg File Interchange FormatVersion 1, 1992 Eric HamiltonC-Cube Microsystems1778 McCarthy , CA 95035+1 408 944-6300 Fax: +1 408 944-6314E-mail: File Interchange FormatVersion a File Interchange FormatJPEG File Interchange Format is a minimal file Format which enables jpeg bitstreams tobe exchanged between a wide variety of platforms and applications. This minimal formatdoes not include any of the advanced features found in the TIFF jpeg specification or anyapplication specific file Format . Nor should it, for the only purpose of this simplified formatis to allow the exchange of jpeg compressed File Interchange Format features Uses jpeg compression Uses jpeg Interchange Format compressed image representation PC or Mac or Unix workstation compatible Standard color space: one or three components.

2 For three components, YCbCr(CCIR 601-256 levels) APP0 marker used to specify Units, X pixel density, Y pixel density, thumbnail APP0 marker also used to specify JFIF extensions APP0 marker also used to specify application-specific informationJPEG CompressionAlthough any jpeg process is supported by the syntax of the jpeg File InterchangeFormat (JFIF) it is strongly recommended that the jpeg baseline process be used for thepurposes of file Interchange . This ensures maximum compatibility with all applicationssupporting jpeg . JFIF conforms to the jpeg Draft International Standard (ISO DIS10918-1).The jpeg File Interchange Format is entirely compatible with the standardJPEG Interchange Format ; the only additional requirement is the mandatory presenceof the APP0 marker right after the SOI marker.

3 Note that jpeg Interchange formatrequires (as does JFIF) that all table specifications used in the encoding process be coded inthe bitstream prior to their across platformsThe jpeg File Interchange Format is compatible across platforms: for example, it does notuse any resource forks, supported by the Macintosh but not by PCs or File Interchange Format , Version color spaceThe color space to be used is YCbCr as defined by CCIR 601 (256 levels). The RGBcomponents calculated by linear conversion from YCbCr shall not be gamma corrected(gamma = ). If only one component is used, that component shall be marker used to identify jpeg FIFThe APP0 marker is used to identify a jpeg FIF file. The jpeg FIF APP0 marker ismandatory right after the SOI JFIF APP0 marker is identified by a zero terminated string: "JFIF".

4 The APP0 can beused for any other purpose by the application provided it can be distinguished from theJFIF JFIF APP0 marker provides information which is missing from the jpeg stream:version number, X and Y pixel density (dots per inch or dots per cm), pixel aspect ratio(derived from X and Y pixel density), marker used to specify JFIF extensionsAdditional APP0 marker segment(s) can optionally be used to specify JFIF extensions. Ifused, these segment(s) must immediately follow the JFIF APP0 marker. Decoders shouldskip any unsupported JFIF extension segments and continue JFIF extension APP0 marker is identified by a zero terminated string: "JFXX". TheJFIF extension APP0 marker segment contains a 1-byte code which identifies theextension. This version, version , has only one extension defined: an extension fordefining thumbnails stored in formats other than 24-bit marker used for application-specific informationAdditional APP0 marker segments can be used to hold application-specific informationwhich does not affect the decodability or displayability of the JFIF file.

5 Application-specific APP0 marker segments must appear after the JFIF APP0 and any JFXX APP0segments. Decoders should skip any unrecognized application-specific APP0 APP0 marker segments are identified by a zero terminated string whichidentifies the application (not "JFIF" or JFXX ). This string should be an organizationname or company trademark. Generic strings such as dog, cat, tree, etc. should not File Interchange Format , Version to and from RGBY, Cb, and Cr are converted from R, G, and B as defined in CCIR Recommendation 601but are normalized so as to occupy the full 256 levels of a 8-bit binary encoding. Moreprecisely:Y = 256 * E'yCb = 256 * [ E'Cb ] + 128Cr = 256 * [ E'Cr ] + 128where the E'y, E'Cb and E'Cb are defined as in CCIR 601. Since values of E'y have arange of 0 to and those for E'Cb and E'Cr have a range of to + , Y, Cb, andCr must be clamped to 255 when they are maximum to YCbCr ConversionYCbCr (256 levels) can be computed directly from 8-bit RGB as follows:Y = R + G + BCb = - R - G + B + 128Cr = R - G - B + 128 NOTE - Not all image file formats store image samples in the order R0, G0,B0.

6 Rn, Gn, Bn. Be sure to verify the sample order before convertingan RGB file to to RGB ConversionRGB can be computed directly from YCbCr (256 levels) as follows:R = Y + (Cr-128)G = Y - (Cb-128) - (Cr-128)B = Y + (Cb-128)Image OrientationIn JFIF files, the image orientation is always top-down. This means that the first imagesamples encoded in a JFIF file are located in the upper left hand corner of the image andencoding proceeds from left to right and top to bottom. Top-down orientation is used forboth the full resolution image and the thumbnail process of converting an image file having bottom-up orientation to JFIF must includeinverting the order of all image lines before jpeg File Interchange Format , Version Relationship of ComponentsSpecification of the spatial positioning of pixel samples within components relative to thesamples of other components is necessary for proper image post processing and accurateimage presentation.

7 In JFIF files, the position of the pixels in subsampled components aredefined with respect to the highest resolution component. Since components must besampled orthogonally (along rows and columns), the spatial position of the samples in agiven subsampled component may be determined by specifying the horizontal and verticaloffsets of the first sample, the sample in the upper left corner, with respect to thehighest resolution horizontal and vertical offsets of the first sample in a subsampled component,Xoffseti[0,0] and Yoffseti[0,0], is defined to beXoffseti[0,0] = ( Nsamplesref / Nsamplesi ) / 2 - [0,0] = ( Nlinesref / Nlinesi ) / 2 - is the number of samples per line in the largest component,Nsamplesi is the number of samples per line in the ith component,Nlinesref is the number of lines in the largest component,Nlinesi is the number of lines in the ith subsampling of components incorporates an anti-aliasing filter which reduces thespectral bandwidth of the full resolution components.

8 Subsampling can easily beaccomplished using a symmetrical digital filter with an even number of taps (coefficients).A commonly used filter for 2:1 subsampling utilizes two taps (1/2,1/2).As an example, consider a 3 component image which is comprised of components havingthe following dimensions:Component 1: 256 samples, 288 linesComponent 2: 128 samples, 144 linesComponent 3: 64 samples, 96 linesIn a JFIF file, centers of the samples are positioned as illustrated below: Component 1 Component 2 Component 3 NOTE - This definition is compatible with industry standards such as PostcriptLevel 2 and QuickTime. This defintition is not compatible with the conventionsused by CCIR Recommendation 601-1 and other digital video formats. For theseformats, pre-processing of the chrominance components is necessary prior tocompression in order to ensure accurate reconstruction of the compressed File Interchange Format , Version File Interchange Format SpecificationThe syntax of a JFIF file conforms to the syntax for Interchange Format defined in Annex Bof ISO DIS 10918-1.

9 In addition, a JFIF file uses APP0 marker segments and constrainscertain parameters in the frame header as defined FF , SOI X FF , APP0, length, identifier, version, units, Xdensity, Ydensity, Xthumbnail, Ythumbnail, (RGB)nlength (2 bytes)Total APP0 field byte count, including the bytecount value (2 bytes), but excluding the APP0marker itselfidentifier(5 bytes)= X'4A', X'46', X'49', X'46', X'00'This zero terminated string ( JFIF ) uniquelyidentifies this APP0 marker. This string shallhave zero parity (bit 7=0).version(2 bytes)= X'0102'The most significant byte is used for majorrevisions, the least significant byte for minorrevisions. Version is the current (1 byte)Units for the X and Y = 0: no units, X and Y specify the pixel aspect ratiounits = 1: X and Y are dots per inchunits = 2.

10 X and Y are dots per cmXdensity(2 bytes)Horizontal pixel densityYdensity(2 bytes)Vertical pixel densityXthumbnail(1 byte)Thumbnail horizontal pixel countYthumbnail(1 byte)Thumbnail vertical pixel count(RGB)n(3n bytes) Packed (24-bit) RGB values for the thumbnail pixels, n = Xthumbnail * Ythumbnail[ Optional JFIF extension APP0 marker segment(s) - see below ] X FF , SOFn, length, frame parametersNumber of componentsNf= 1 or 31st componentC1= 1 = Y component2nd componentC2= 2 = Cb component3rd componentC3= 3 = Cr component X FF , EOIJPEG File Interchange Format , Version Extension APP0 Marker SegmentImmediately following the JFIF APP0 marker segment may be a JFIF extension APP0marker. This JFIF extension APP0 marker segment may only be present for JFIF and above. The syntax of the JFIF extension APP0 marker segment is: X FF , APP0, length, identifier, extension_code, extension_datalength (2 bytes)Total APP0 field byte count, including the bytecount value (2 bytes), but excluding the APP0marker itselfidentifier(5 bytes)= X'4A', X'46', X'58', X'58', X'00'This zero terminated string ( JFXX ) uniquelyidentifies this APP0 marker.


Related search queries