Photoshop plugins : JPEG-LS, JPEG-XR, JPEG-2000

Last update: July 19, 2015

JPEG

JPEG (file extension.jpg) is a commonly used method of lossy compression for digital images. 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.

The term JPEG is an acronym for the Joint Photographic Experts Group, which was organized in 1986 and created the first standard in 1992. JPEG uses a lossy form of compression based on the discrete cosine transform (DCT). The method lossy means that some original image information is lost and cannot be restored, possibly affecting image quality.

Progressive JPEG

The interlaced Progressive JPEG format compresses data 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.

Standard

Standard Photoshop CS2 JPEG Save as options

JPEG-HDR

JPEG-HDR is an extension to the standard JPEG image file format allowing it to store high dynamic range images. It was created by Greg Ward and Maryann Simmons as a way to store high dynamic range images inside a standard JPEG file.

JPEG-XR

JPEG XR is a still-image compression standard and file format for continuous tone photographic images, based on technology originally developed and patented by Microsoft under the name HD Photo. It supports both lossy and lossless compression and is supported in Internet Explorer 9 and alter versions. Today there are not yet cameras that shoot photos in the JPEG XR (.JXR) format.

Lossless JPEG

An optional lossless mode was defined in the JPEG standard in 1993, using a completely different technique as the lossy JPEG standard. The lossless coding process employs a simple predictive coding model called differential pulse code modulation (DPCM). Lossless JPEG has some popularity in medical imaging (DICOM), and is used in DNG and some digital cameras to compress raw images, but otherwise was never widely adopted.

Today the term lossless JPEG is usually used as umbrella term to refer to all lossless image compression schemes including JPEG-LS and JPG 2000.

JPEG-LS

JPEG-LS is a lossless/near-lossless compression standard for continuous-tone images with the official designation ISO-14495-1/ITU-T.87. Part 1 of this standard was finalized in 1999. Besides lossless compression, JPEG-LS also provides a lossy mode (“near-lossless”) where the maximum absolute error can be controlled by the encoder. The filename extension is .jls. Compression for JPEG-LS is generally much faster than JPEG 2000 and much better than the original lossless JPEG standard. The JPEG-LS standard is based on the LOCO-I algorithm (LOw COmplexity LOssless COmpression for Images) developed at Hewlett-Packard Laboratories.

JPEG 2000

JPEG 2000 is an image compression standard and coding system defined in 2000 with the intention of superseding the original discrete cosine transform-based JPEG standard with a newly designed, wavelet-based method. The standardized filename extension is .jp2 or .jpx for the extended part-2 specification. JPEG 2000 is not widely supported in web browsers and therefore not generally used on the Internet. JP2 includes mandatory metadata such as information about an image’s color space. It handles alpha transparency and 16-bit color mode.

Photoshop plugins : JPEG-LS, JPEG-XR, JPEG-2000

JPEG

Photoshop CS2 JPEG-LS plugin by HP

HP offers a copyrighted Photoshop plugin for JPEG-LS. Additional informations about JPEG-LS source code are available at the Wayback Archive Webpage of Aleks Jakulin.

A free JPEG 2000 (j2k) plugin for Photoshop is provided by fnord software, a small software boutique in San Francisco, creating graphics software primarily for Macintosh computers. fnord software provides also a SuperPNG plugin for Adobe Photoshop and a WebM plugin for Adobe Premiere.

JPEG 2000 plugin

JPEG 2000 plugin from fnor software in Photoshop CS2

The advanced features are not working as expected in my Photoshop CS2 version.

Microsoft provides a Photoshop plugin for JPEG-XR

plugin

JPEG-XR plugin from Microsoft in Photoshop CS2

.

Compressing Human Knowledge

Marcus Hutter, a German computer scientist and professor at the Australian National University, funded in August 2006 a 50.000 euros cash prize, which rewards data compression improvements on the first 100.000.000 characters of a specific version of English Wikipedia (envik8). Specifically, the prize awards 500 euros for each percent improvement in the compressed size of the file enwik8. The prize baseline was 18,324,887 bytes, achieved by PAQ8F, a free lossless data compression archiver. The contest is open ended and is open to everyone. The ongoing competition is organized by Marcus Hutter, Matt Mahoney and Jim Bowery.

The goal of the Hutter Prize is to encourage research in artificial intelligence (AI). The organizers believe that text compression and AI are equivalent problems. There is no general solution to achieve this goal because the descriptive complexity is not computable. In algorithmic information theory the measure of the computational resources needed to specify an object is called the Kolmogorov complexity, named after Andrey Nikolaevich Kolmogorov, a Soviet mathematician.

Optimize png images

PNG (Portable Network Graphics) is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license.

PNG supports palette-based images, grayscale images, and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG uses a non-patented lossless data compression method known as DEFLATE, which is the same algorithm used in the zlib compression library.

The first version of the PNG specification was released on October 1, 1996 as a W3C Recommendation.

Various tools are available for optimizing .png files; they do this by :

  • removing ancillary chunks
  • reducing color depth
  • optimizing line-by-line filter choice
  • optimizing DEFLATE compression.

In general one must use a combination of 2 tools in sequence for optimal compression: one which optimizes filters and removes ancillary chunks, and one which optimizes DEFLATE.

Some common tools are :

  • OptiPNG
  • PNGOUT
  • Pngcrush
  • PngGauntlet

There are several online tools available on the web to optimize .png files :

  • PunyPNG, compression and image optimization tool developed by Gracepoint Berkeley
  • Smush.it, by Yahoo Developer Network

A list of some useful tutorials about image compression is shown below :

Website with GZip compression

last update : 20 August 2012
Compression is a simple, effective way to save bandwidth and speed up a website. The browser sends a header telling the server it accepts compressed content (Accept-Encoding: gzip ; Accept-Encoding: deflate). The server sends a response if the content is actually compressed: Content-Encoding: gzip. If the server doesn’t want to send back compressed content, the browser has to make do with the heavy regular version.

A webserver can be configured (in the settings or in the .htaccess file) to return zipped content if the browser can handle it, saving bandwidth for everyone. If you use the Amazon AWS S3 service as a webserver, you can upload compressed files in the AWS management console and add a metatag

Content-Encoding: gzip

in the HTTP header of the files.

I use the WinGZip utility (version 1) created by Irnis Haliullin to compress the content uploaded to my Amazon AWS S3 buckets. An online tool GIDZip Test to check compressed websites is available at gidnetwork.com.

Some useful documentation about Gzip compression is listed herafter :