JNG
Encyclopedia
JPEG Network Graphics is a JPEG
JPEG
In computing, JPEG . The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality....

-based graphics file format which is closely related to PNG: it uses the PNG file structure (with a different signature) as a container format to wrap JPEG encoded image data.

JNG was created as an adjunct to the MNG animation format, but may be used as a stand-alone format. JNG files embed an 8-bit or 12-bit JPEG datastream in order to store color data, and may embed another datastream (1, 2, 4, 8, 16 bit PNG, or 8 bit JPEG grayscale image) for transparency information. However, a JNG may contain two separate JPEG datastreams for color information (one eight-bit and one twelve-bit) to permit decoders that are unable to (or do not wish to) handle twelve-bit datastreams to display the eight-bit datastream instead, if one is present.

Version 1.0 of the JNG specification was released on January 31, 2001 (initially as part of the MNG specification). Usually, all the applications supporting the MNG file format can handle JNG files, too. E.g., Konqueror
Konqueror
Not to be confused with the Conqueror web browser.Konqueror is a web browser and file manager that provides file-viewer functionality for file systems such as local files, files on a remote ftp server and files in a disk image. It is a core part of the KDE desktop environment...

 has native MNG/JNG support, and MNG/JNG plugins are available for Opera
Opera (web browser)
Opera is a web browser and Internet suite developed by Opera Software with over 200 million users worldwide. The browser handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, chatting on IRC, downloading files via BitTorrent,...

, Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...

, and Mozilla Firefox
Mozilla Firefox
Mozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. , Firefox is the second most widely used browser, with approximately 25% of worldwide usage share of web browsers...

. The Mozilla Application Suite
Mozilla Application Suite
The Mozilla Application Suite is a cross-platform integrated Internet suite. Its development was initiated by Netscape Communications Corporation, before their acquisition by AOL. It is based on the source code of Netscape Communicator...

 (and hence Netscape
Netscape (web browser)
Netscape 7 was a series of proprietary cross-platform Internet suites created by Netscape Communications Corporation and then in-house by AOL to continue the Netscape series after Netscape 6. There were three main editions released from the Netscape 7 series; being Netscape 7.0, 7.1 and 7.2...

) originally supported MNG/JNG, but native support was removed in Mozilla 1.5a by developers and Mozilla has not supported the format since, despite requests from its users. Safari
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

 does not support MNG/JNG.

JNG enhances the capabilities of the JFIF format (the usual JPEG file format), by supporting transparency, two consecutive color streams (one 8 bit and the other 12 bit), and other useful PNG features like color correction, gamma correction, embedded color profiles, PNG style metadata, checksums, etc. The transparency information inside a JNG file (as an alpha channel) can be saved either in lossless PNG format, or in lossy JPEG format. This way, users can benefit from the power of JPEG compression while preserving lossless (PNG compressed) transparency information.

The chunk based structure of JNG files is essentially the same as that of PNG files, differing only in the slightly different signature and the use of different chunks.
Network Graphics signatures
Name Signature
hexadecimal
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

 
ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 + C0, C1
C0 and C1 control codes
Most character encodings, in addition to representing printable characters, may also represent additional information about the text, such as the position of a cursor, an instruction to start a new line, or a message that the text has been received...

PNG 89 50 4E 47 0D 0A 1A 0A  0x80 "PNG" CR
Carriage return
Carriage return, often shortened to return, refers to a control character or mechanism used to start a new line of text.Originally, the term "carriage return" referred to a mechanism or lever on a typewriter...

 LF SUB
Substitute character
A substitute character is a control character that is used in the place of a character that is recognized to be invalid or in error or that cannot be represented on a given device....

 LF
MNG 8A 4D 4E 47 0D 0A 1A 0A > 0x80 "MNG" CR LF SUB LF
JNG 8B 4A 4E 47 0D 0A 1A 0A  0x80 "JNG" CR LF SUB LF


JNG does not have a registered MIME
MIME
Multipurpose Internet Mail Extensions is an Internet standard that extends the format of email to support:* Text in character sets other than ASCII* Non-text attachments* Message bodies with multiple parts...

media type, but image/x-jng can be used.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK