A filename is a name used to uniquely identify a computer file stored in a file system. Different file systems impose different restrictions on filename lengths and the allowed characters within filenames. A filename may include one or more of these components: host – network device that contains the file device – hardware device or drive directory – directory tree file – base name of the file type – indicates the content type of the file version – revision or generation number of the fileThe components required to identify a file varies across operating systems, as does the syntax and format for a valid filename. Discussions of filenames are complicated by a lack of standardization of the term. Sometimes "filename" is used to mean the entire name, such as the Windows name c:\directory\myfile.txt. Sometimes, it will be used to refer to the components, so the filename in this case would be myfile.txt. Sometimes, it is a reference that excludes an extension, so the filename would be just myfile.
Around 1962, the Compatible Time-Sharing System introduced the concept of a file. Around this same time appeared the dot as a filename extension separator, the limit to three letter extensions might have come from 16-bit RAD50 character encoding limits. Traditionally, most operating system supported filenames with only uppercase alphanumeric characters, but as time progressed, the number of characters allowed increased; this led to compatibility problems. In 1985, RFC 959 defined a pathname to be the character string that must be entered into a file system by a user in order to identify a file. Around 1995, VFAT, an extension to the MS-DOS FAT filesystem, was introduced in Windows 95 and Windows NT, it allowed mixed-case Unicode long filenames, in addition to classic "8.3" names. One issue was migration to Unicode. For this purpose, several software companies provided software for migrating filenames to the new Unicode encoding. Microsoft provided migration transparent for the user throughout the vfat technology Apple provided "File Name Encoding Repair Utility v1.0".
The Linux community provided “convmv”. Mac OS X 10.3 marked Apple's adoption of Unicode 3.2 character decomposition, superseding the Unicode 2.1 decomposition used previously. This change caused problems for developers writing software for Mac OS X. An absolute reference includes all directory levels. In some systems, a filename reference that does not include the complete directory path defaults to the current working directory; this is a relative reference. One advantage of using a relative reference in program configuration files or scripts is that different instances of the script or program can use different files; this makes an relative path composed of a sequence of filenames. Unix-like file systems allow a file to have more than one name. Windows supports hard links on NTFS file systems, provides the command fsutil in Windows XP, mklink in versions, for creating them. Hard links are different from classic Mac OS/macOS aliases, or symbolic links; the introduction of LFNs with VFAT allowed filename aliases.
For example, longfi~1.??? with a maximum of eight plus three characters was a filename alias of "long file name.???" as a way to conform to 8.3 limitations for older programs. This property was used by the move command algorithm that first creates a second filename and only removes the first filename. Other filesystems, by design, provide only one filename per file, which guarantees that alteration of one filename's file does not alter the other filename's file; some filesystems restrict the length of filenames. In some cases, these lengths apply to the entire file name, as in 44 characters on IBM S/370. In other cases, the length limits may apply to particular portions of the filename, such as the name of a file in a directory, or a directory name. For example, 9, 11, 14, 21, 31, 30, 15, 44, or 255 characters or bytes. Length limits result from assigning fixed space in a filesystem to storing components of names, so increasing limits requires an incompatible change, as well as reserving more space.
A particular issue with filesystems that store information in nested directories is that it may be possible to create a file with a complete pathname that exceeds implementation limits, since length checking may apply only to individual parts of the name rather than the entire name. Many Windows applications are limited to a MAX_PATH value of 260, but Windows file names can exceed this limit. Many file systems, including FAT, NTFS, VMS systems, allow a filename extension that consists of one or more characters following the last period in the filename, dividing the filename into two parts: a base name or stem and an extension or suffix used by some applications to indicate the file type. Multiple output files created by an application use various extensions. For example, a compiler might use the extension FOR for source input file, OBJ for the object output and LST for the listing. Although there are some common extensions, they are arbitrary and a different application might use REL and RPT.
On filesystems that do not segregate the extension, files will have a longer extension such as html. There is no general encoding standard for filenames
The Graphics Interchange Format, is a bitmap image format, developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite on June 15, 1987. It has since come into widespread usage on the World Wide Web due to its wide support and portability between many applications and operating systems; the format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space. It supports animations and allows a separate palette of up to 256 colors for each frame; these palette limitations make GIF less suitable for reproducing color photographs and other images with color gradients, but it is well-suited for simpler images such as graphics or logos with solid areas of color. GIF images are compressed using the Lempel–Ziv–Welch lossless data compression technique to reduce the file size without degrading the visual quality; this compression technique was patented in 1985.
Controversy over the licensing agreement between the software patent holder and CompuServe in 1994 spurred the development of the Portable Network Graphics standard. By 2004 all the relevant patents had expired. CompuServe introduced GIF on June 15, 1987 to provide a color image format for their file downloading areas, replacing their earlier run-length encoding format, black and white only. GIF became popular because it used LZW data compression, more efficient than the run-length encoding that formats such as those used by PCX and MacPaint, large images could therefore be downloaded in a reasonably short time with slow modems; the original version of GIF was called 87a. In 1989, CompuServe released an enhanced version, called 89a, which added support for animation delays, transparent background colors, storage of application-specific metadata; the 89a specification supports incorporating text labels as text, but as there is little control over display fonts, this feature is not used. The two versions can be distinguished by looking at the first six bytes of the file, when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively.
CompuServe encouraged the adoption of GIF by providing downloadable conversion utilities for many computers. By December 1987, for example, an Apple IIGS user could view pictures created on an Atari ST or Commodore 64. GIF was one of the first two image formats used on Web sites, the other being the black-and-white XBM. In September 1995 Netscape Navigator 2.0 added the ability for animated GIFs to loop. The feature of storing multiple images in one file, accompanied by control data, is used extensively on the Web to produce simple animations; the optional interlacing feature, which stores image scan lines out of order in such a fashion that a downloaded image was somewhat recognizable helped GIF's popularity, as a user could abort the download if it was not what was required. In May 2015 Facebook added support for GIF; as a noun, the word GIF is found in the newer editions of many dictionaries. In 2012, the American wing of the Oxford University Press recognized GIF as a verb as well, meaning "to create a GIF file", as in "GIFing was perfect medium for sharing scenes from the Summer Olympics".
The press's lexicographers voted it their word of the year, saying that GIFs have evolved into "a tool with serious applications including research and journalism". The creators of the format pronounced the word as "jif" with a soft "G" as in "gin". Steve Wilhite says that the intended pronunciation deliberately echoes the American peanut butter brand Jif, CompuServe employees would say "Choosy developers choose GIF", spoofing this brand's television commercials; the word is now widely pronounced with a hard "G" as in "gift". In 2017, an informal poll on programming website Stack Overflow showed some numerical preference for hard-"G" pronunciation among respondents in eastern Europe, though both soft-"G" and enunciating each letter individually were found to be popular in Asia and emerging countries; the American Heritage Dictionary cites both, indicating "jif" as the primary pronunciation, while Cambridge Dictionary of American English offers only the hard-"G" pronunciation. Merriam-Webster's Collegiate Dictionary and the OED cite both pronunciations, but place "gif" in the default position.
The New Oxford American Dictionary gave only "jif" in its 2nd edition but updated it to "jif, gif" in its 3rd edition. The disagreement over the pronunciation led to heated Internet debate. On the occasion of receiving a lifetime achievement award at the 2013 Webby Award ceremony, Wilhite rejected the hard-"G" pronunciation, his speech led to 17,000 posts on Twitter and 50 news articles; the White House and TV program Jeopardy! entered the debate during 2013. GIFs are suitable for sharp-edged line art with a limited number of colors; this takes advantage of the format's lossless compression, which favors flat areas of uniform color with well defined edges. GIFs may be used to store low-color sprite data for games. GIFs can be used for low-resolution video clips. Conceptually, a GIF file describes a fixed-sized graphical area populated with zero or more "images". Many GIF files have a single image. Others divide the logical screen into separate sub-images; the images may function as animation frames in an animated GIF file, but again these need not fill the entire logical screen.
GIF files start with a fixed-length header ("GIF87a" o
Flexible Image Transport System is an open standard defining a digital file format useful for storage and processing of data: formatted as N-dimensional arrays, or tables. FITS is the most used digital file format in astronomy; the FITS standard has special features for scientific data, for example it includes many provisions for describing photometric and spatial calibration information, together with image origin metadata. The FITS format was first standardized in 1981. FITS was designed with an eye towards long-term archival storage, the maxim once FITS, always FITS represents the requirement that developments to the format must be backward compatible. A major feature of the FITS format is that image metadata is stored in a human-readable ASCII header, so that an interested user can examine the headers to investigate a file of unknown provenance; the information in the header is designed to calculate the byte offset of some information in the subsequent data unit to support direct access to the data cells.
Each FITS file consists of one or more headers containing ASCII card images that carry keyword/value pairs, interleaved between data blocks. The keyword/value pairs provide information such as size, coordinates, binary data format, free-form comments, history of the data, anything else the creator desires: while many keywords are reserved for FITS use, the standard allows arbitrary use of the rest of the name-space. FITS is often used to store non-image data, such as spectra, photon lists, data cubes, or structured data such as multi-table databases. A FITS file may contain several extensions, each of these may contain a data object. For example, it is possible to store infrared exposures in the same file; the earliest and still most used type of FITS data is an image header/data block. The term'image' is somewhat loosely applied, as the format supports data arrays of arbitrary dimension—normal image data are 2-D or 3-D; the data themselves may be in one of several integer and floating-point formats, specified in the header.
FITS image headers can contain information about one or more scientific coordinate systems that are overlaid on the image itself. Images contain an implicit Cartesian coordinate system that describes the location of each pixel in the image, but scientific uses require working in'world' coordinates, for example the celestial coordinate system; as FITS has been generalized from its original form, the world coordinate system specifications have become more and more sophisticated: early FITS images allowed a simple scaling factor to represent the size of the pixels. The WCS standard includes many different spherical projections, for example, the HEALPix spherical projection used in observing the cosmic microwave background radiation. FITS supports tabular data with named columns and multidimensional rows. Both binary and ASCII table formats have been specified; the data in each column of the table can be in a different format from the others. Together with the ability to string multiple header/data blocks together, this allows FITS files to represent entire relational databases.
FITS support is available in a variety of programming languages that are used for scientific work, including C, C++, C#, Fortran, IGOR Pro, IDL, Julia, LabVIEW, Mathematica, MATLAB, Perl, PDL, Python, R, Tcl. The FITS Support Office at NASA/GSFC maintains a list of libraries and platforms that support FITS. Image processing programs such as ImageJ, GIMP, Chasys Draw IES, XnView and IrfanView can read simple FITS images, but cannot interpret more complex tables and databases. Scientific teams write their own code to interact with their FITS data, using the tools available in their language of choice; the FITS Liberator software is used by imaging scientists at the European Space Agency, the European Southern Observatory and NASA. The SAOImage DS9 Astronomical Data Visualization Application is available for many OSs, handles images and headers. Many scientific computing environments make use of the coordinate system data in the FITS header to display, rectify, or otherwise manipulate FITS images.
Examples are the coordinate transform library included with PDL, the PLOT MAP library in the Solarsoft solar-physics-related software tree, the Starlink Project AST library in C, the PyFITS package in Python, now merged into the Astropy library. The FITS standard version 4.0 was approved by the IAU FITS Working Group in July 2016. Advanced Scientific Data Format FITS Liberator Hierarchical Data Format Common Data Format NetCDF Official website, Goddard Support Office FITS Birthday Announcement - Historical note from Don Wells on the events leading up to the'birth' of the FITS format in 1979. FITS I/O Libraries, a list of software for reading and writing FITS files for various languages
A Netpbm format is any graphics format used and defined by the Netpbm project. The portable pixmap format, the portable graymap format and the portable bitmap format are image file formats designed to be exchanged between platforms, they are sometimes referred to collectively as the portable anymap format, not to be confused with the related portable arbitrary map format. The PBM format was invented by Jef Poskanzer in the 1980s as a format that allowed monochrome bitmaps to be transmitted within an email message as plain ASCII text, allowing it to survive any changes in text formatting. Poskanzer developed the first library of tools to handle the PBM format, released in 1988, it contained tools to convert between PBM and other graphics formats. By the end of 1988, Poskanzer had developed the PGM and PPM formats along with their associated tools and added them to Pbmplus; the final release of Pbmplus was December 10, 1991. In 1993, the Netpbm library was developed to replace the unmaintained Pbmplus.
It was a repackaging of Pbmplus with additions and fixes submitted by people all over the world. Each file starts with a two-byte magic number that identifies the type of file it is and its encoding; the magic number is a capital P followed by a single-digit number. A value of P7 refers to the PAM file format, covered as well by the netpbm library; the ASCII formats allow for human easy transfer to other platforms. In the binary formats, PBM uses 1 bit per pixel, PGM uses 8 bits per pixel, PPM uses 24 bits per pixel: 8 for red, 8 for green, 8 for blue. A simple example of the PBM format is as follows: P1 # This is an example bitmap of the letter "J" 6 10 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The string P1 identifies the file format; the number sign introduces a comment. The next two numbers give the height. Follows the matrix with the pixel values, it is not required that pixels are nicely lined up, the format ignores whitespaces and linefeeds in the data section, although it's recommended that no line is longer than 76 characters.
The following displays the same image: P1 # This is an example bitmap of the letter "J" 6 10 000010000010000010000010000010000010100010011100000000000000 Here is the resulting image: Here it is again magnified 20 times: Note that a 0 signifies a white pixel, a 1 signifies a black pixel. This is in contrast to the other formats; the P4 binary format of the same image represents each pixel with a single bit, packing 8 pixels per byte, with the first pixel as the most significant bit. Extra bits are added at the end of each row to fill a whole byte; the PGM and PPM formats have an additional parameter for the maximum value after the X and Y dimensions and before the actual pixel data. Black is 0 and max value is white. There is a newline character at the end of each line. P2 # Shows the word "FEEP" 24 7 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 This is an example of a color RGB image stored in PPM format.
There is a newline character at the end of each line. P3 3 2 255 # The part above is the header # "P3" means this is a RGB color image in ASCII # "3 2" is the width and height of the image in pixels # "255" is the maximum value for each color # The part below is image data: RGB triplets 255 0 0 0 255 0 0 0 255 255 255 0 255 255 255 0 0 0 The P6 binary format of the same image represents each color component of each pixel with one byte in the order red, green blue; the file is smaller. The PPM format is not compressed, thus requires more space and bandwidth than a compressed format would. For example, the above 192×128 PNG image has a file size of 166 bytes; when converted to a 192×128 PPM image, the file size is 73,848 bytes. The PPM format is an intermediate format used for image work before converting to a more efficient format, for example the PNG format, without any loss of information in the intermediate step; the image shown above using only 0 or the maximal value for the red-green-blue channels can be encoded as:P3 # The same image with width 3 and height 2, # using 0 or 1 per color 3 2 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 0 White space including line ends and comment lines is syntactically equivalent to a single space within the PNM headers.
For the plain formats P1…P3 this affects the pixmap lines. One can of course use the ASCII format, but this format both slows down reading and makes the files much larger. Accordingly, many programmers extended the format to allow higher bit depths. Using highe
JPEG XR is a still-image compression standard and file format for continuous tone photographic images, based on technology developed and patented by Microsoft under the name HD Photo. It supports both lossy and lossless compression, is the preferred image format for Ecma-388 Open XML Paper Specification documents. Support for the format is available in Adobe Flash Player 11.0, Adobe AIR 3.0, Sumatra PDF 2.1, Windows Imaging Component. NET Framework 3.0, Windows Vista, Windows 7, Windows 8, Internet Explorer 9, Internet Explorer 10, Internet Explorer 11, Pale Moon 27.2. As of August 2014, there were still no cameras. Microsoft first announced Windows Media Photo at WinHEC 2006, renamed it to HD Photo in November of that year. In July 2007, the Joint Photographic Experts Group and Microsoft announced HD Photo to be under consideration to become a JPEG standard known as JPEG XR. On 16 March 2009, JPEG XR was given final approval as ITU-T Recommendation T.832 and starting in April 2009, it became available from the ITU-T in "pre-published" form.
On 19 June 2009, it passed an ISO/IEC Final Draft International Standard ballot, resulting in final approval as International Standard ISO/IEC 29199-2. The ITU-T updated its publication with a corrigendum approved in December 2009, ISO/IEC issued a new edition with similar corrections on 30 September 2010. In 2010, after completion of the image coding specification, the ITU-T and ISO/IEC published a motion format specification, a conformance test set, reference software for JPEG XR. In 2011, they published a technical report describing the workflow architecture for the use of JPEG XR images in applications. JPEG XR is an image file format that offers several key improvements over JPEG, including: Better compression JPEG XR file format supports higher compression ratios in comparison to JPEG for encoding an image with equivalent quality. Lossless compression JPEG XR supports lossless compression; the signal processing steps in JPEG XR are the same for both lossless and lossy coding. This makes the lossless mode simple to support and enables the "trimming" of some bits from a lossless compressed image to produce a lossy compressed image.
Tile structure support. The data for each region can be decoded separately; this enables rapid access to parts of an image without needing to decode the entire image. When a type of tiling referred to as "soft tiling" is used, the tile region structuring can be changed without decoding the image and without introducing additional distortion. Support for more color accuracy JPEG XR supports a wide variety of image color representations in addition to the conventional 8-bit-per-sample YUV 4:2:0 encoding, used for the original JPEG standard. For support of images using an RGB color space, JPEG XR includes an internal conversion to the YCgCo color space, supports a variety of bit depth and color representation packing schemes; these can be used with and without an accompanying alpha channel for shape masking and semi-transparency support, some of them have much higher precision than what has been used for image coding. They include: Low bit-depth packings of RGB into 16 bits per pixel using 5 bits for each channel or 5 bits for red and blue and 6 bits for green 8 bits per component packed into 24 or 32 bits per pixel 10 bits per component in a 32 bit packed representation 16 bits per component as integers, fixed-point numbers, or half-precision floating-point numbers packed into 48 or 64 bits 32 bits per component as fixed-point numbers or full-precision floating point numbers packed into 96 or 128 bits JPEG XR supports 16-bit per component integer CMYK color model.16-bit and 32-bit fixed point color component codings are supported in JPEG XR.
In such encodings, the most-significant 4 bits of each color channel are treated as providing additional "headroom" and "toe room" beyond the range of values that represents the nominal black-to-white signal range. Moreover, 16-bit and 32-bit floating point color component codings are supported in JPEG XR. In these cases the image is interpreted as floating point data, although the JPEG XR encoding and decoding steps are all performed using only integer operations; the shared-exponent floating point color format known as RGBE is supported, enabling more faithful storage of High Dynamic Range images. In addition to RGB and CMYK formats, JPEG XR supports grayscale and multi-channel color encodings with an arbitrary number of channels; the color representations, in most cases, are transformed to an internal color representation. The transformation is reversible, so that this color transformation step does not introduce distortion and thus lossless coding modes can be supported. Transparency map support An alpha channel may be present to represent transparency, so that alpha blending overlay capability is enabled.
Compressed-domain image modification In JPEG XR, full decoding of the image is unnecessary for converting an image from a lossless to lossy encoding, reducing the fidelity of a lossy encoding, or reducing the encoded image resolution. Full decoding is unnecessary for certain editing operations such as cropping, horizontal or vertical flips, or cardinal rotations; the tile structure for access
JPEG is a used method of lossy compression for digital images for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG achieves 10:1 compression with little perceptible loss in image quality. JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other photographic image capture devices; these format variations are not distinguished, are called JPEG. The term "JPEG" is an initialism/acronym for the Joint Photographic Experts Group, which created the standard; the MIME media type for JPEG is image/jpeg, except in older Internet Explorer versions, which provides a MIME type of image/pjpeg when uploading JPEG images. JPEG files have a filename extension of.jpg or.jpeg. JPEG/JFIF supports a maximum image size of 65,535×65,535 pixels, hence up to 4 gigapixels for an aspect ratio of 1:1. "JPEG" stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and other still picture coding standards.
The "Joint" stood for ISO TC97 WG8 and CCITT SGVIII. In 1987, ISO TC 97 became ISO/IEC JTC1 and, in 1992, CCITT became ITU-T. On the JTC1 side, JPEG is one of two sub-groups of ISO/IEC Joint Technical Committee 1, Subcommittee 29, Working Group 1 – titled as Coding of still pictures. On the ITU-T side, ITU-T SG16 is the respective body; the original JPEG Group was organized in 1986, issuing the first JPEG standard in 1992, approved in September 1992 as ITU-T Recommendation T.81 and, in 1994, as ISO/IEC 10918-1. The JPEG standard specifies the codec, which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream; the Exif and JFIF standards define the used file formats for interchange of JPEG-compressed images. JPEG standards are formally named as Information technology – Digital compression and coding of continuous-tone still images. ISO/IEC 10918 consists of the following parts: Ecma International TR/98 specifies the JPEG File Interchange Format.
The JPEG compression algorithm operates at its best on photographs and paintings of realistic scenes with smooth variations of tone and color. For web usage, where reducing the amount of data used for an image is important for responsive presentation, JPEG's compression benefits make JPEG popular. JPEG/Exif is the most common format saved by digital cameras. However, JPEG is not well suited for line drawings and other textual or iconic graphics, where the sharp contrasts between adjacent pixels can cause noticeable artifacts; such images are better saved in a lossless graphics format such as TIFF, GIF, PNG, or a raw image format. The JPEG standard includes a lossless coding mode; as the typical use of JPEG is a lossy compression method, which reduces the image fidelity, it is inappropriate for exact reproduction of imaging data. JPEG is not well suited to files that will undergo multiple edits, as some image quality is lost each time the image is recompressed if the image is cropped or shifted, or if encoding parameters are changed – see digital generation loss for details.
To prevent image information loss during sequential and repetitive editing, the first edit can be saved in a lossless format, subsequently edited in that format finally published as JPEG for distribution. JPEG uses a lossy form of compression based on the discrete cosine transform; this mathematical operation converts each frame/field of the video source from the spatial domain into the frequency domain. A perceptual model based loosely on the human psychovisual system discards high-frequency information, i.e. sharp transitions in intensity, color hue. In the transform domain, the process of reducing information is called quantization. In simpler terms, quantization is a method for optimally reducing a large number scale into a smaller one, the transform-domain is a convenient representation of the image because the high-frequency coefficients, which contribute less to the overall picture than other coefficients, are characteristically small-values with high compressibility; the quantized coefficients are sequenced and losslessly packed into the output bitstream.
Nearly all software implementations of JPEG permit user control over the compression ratio, allowing the user to trade off picture-quality for smaller file size. In embedded applications, the parameters are fixed for the application; the compression method is lossy, meaning that some original image information is lost and cannot be restored affecting image quality. There is an optional lossless mode defined in the JPEG standard. However, this mode is not supported in products. There is an interlaced progressive JPEG format, in which data is compressed in multiple passes of progressively higher detail; this is ideal for large images that will be displayed while downloading over a slow connection, allowing a reasonable preview after receiving only a portion of the data. However, support for progressive JPEGs is not universal; when progressive JPEGs are received by programs that do not support them (such
JBIG2 is an image compression standard for bi-level images, developed by the Joint Bi-level Image Experts Group. It is suitable for both lossless and lossy compression. According to a press release from the Group, in its lossless mode JBIG2 generates files 3–5 times smaller than Fax Group 4 and 2–4 times smaller than JBIG, the previous bi-level compression standard released by the Group. JBIG2 has been published in 2000 as the international standard ITU T.88, in 2001 as ISO/IEC 14492. Ideally, a JBIG2 encoder will segment the input page into regions of text, regions of halftone images, regions of other data. Regions that are neither text nor halftones are compressed using a context-dependent arithmetic coding algorithm called the MQ coder. Textual regions are compressed as follows: the foreground pixels in the regions are grouped into symbols. A dictionary of symbols is created and encoded also using context-dependent arithmetic coding, the regions are encoded by describing which symbols appear where.
A symbol will correspond to a character of text, but this is not required by the compression method. For lossy compression the difference between similar symbols can be neglected. Halftone images may be compressed by reconstructing the grayscale image used to generate the halftone and sending this image together with a dictionary of halftone patterns. Overall, the algorithm used by JBIG2 to compress text is similar to the JB2 compression scheme used in the DjVu file format for coding binary images. PDF files versions above may contain JBIG2-compressed data. Open-source decoders for JBIG2 are jbig2dec, the java-based jbig2-imageio and the decoder found in versions 2.00 and above of xpdf. An open-source encoder is jbig2enc. A bi-level image consists of a large amount of textual and halftone data, in which the same shapes appear repeatedly; the bi-level image is segmented into three regions: text and generic regions. Each region is coded differently and the coding methodologies are described in the following passage.
Text coding is based on the nature of human visual interpretation. A human observer cannot tell the difference between two instances of the same characters in a bi-level image though they may not match pixel by pixel. Therefore, only the bitmap of one representative character instance needs to be coded instead of coding the bitmaps of each occurrence of the same character individually. For each character instance, the coded instance of the character is stored into a "symbol dictionary". There are two encoding methods for text image data: pattern matching and substitution and soft pattern matching; these methods are presented in the following subsections. Pattern matching and substitution After performing image segmentation and match searching, if a match exists, we code an index of the corresponding representative bitmap in the dictionary and the position of the character on the page; the position is relative to another coded character. If a match is not found, the segmented pixel block is added into the dictionary.
Typical procedures of pattern matching and substitution algorithm are displayed in the left block diagram of the figure above. Although the method of PM&S can achieve outstanding compression, substitution errors could be made during the process if the image resolution is low. Soft pattern matching In addition to a pointer to the dictionary and position information of the character, refinement data is required because it is a crucial piece of information used to reconstruct the original character in the image; the deployment of refinement data can make the character-substitution error mentioned earlier unlikely. The refinement data contains the current desired character instance, coded using the pixels of both the current character and the matching character in the dictionary. Since it is known that the current character instance is correlated with the matched character, the prediction of the current pixel is more accurate. Halftone images can be compressed using two methods. One of the methods is similar to the context-based arithmetic coding algorithm, which adaptively positions the template pixels in order to obtain correlations between the adjacent pixels.
In the second method, descreening is performed on the halftone image so that the image is converted back to grayscale. The converted grayscale values are used as indexes of fixed-sized tiny bitmap patterns contained in a halftone bitmap dictionary; this allows decoder to render a halftone image by presenting indexed dictionary bitmap patterns neighboring with each other. All three region types including text and generic regions may all use arithmetic coding. JBIG2 uses the MQ coder. Patents for JBIG2 are owned by Mitsubishi. Free licenses should be available after a request. JBIG and JBIG2 patents are not the same; when used in lossy mode, JBIG2 compression can alter text in a way that's not discernible as corruption. This is in contrast to some other algorithms, which degrade into a blur, making the compression artifacts obvious. Since JBIG2 tries to match up similar-looking symbols, the numbers "6" and "8" may get replaced, for example. In 2013, various substitutions were reported to happen on many Xerox Workcentre photocopier and printer machines, where numbers printed on scanned documents could have been altered.
This has been demonstrated on construction blueprints and some tables of numbers