Cloudinary Blog

The Great JPEG 2000 Debate: Analyzing the Pros and Cons to Widespread Adoption

By Prosper Otemuyiwa
JPEG 2000 Debate: Adoption Pros and Cons | Cloudinary Blog

JPEG 2000 is not dead! There are several conversations online about the usability of JPEG 2000 and why it is not commonly used like the other image formats such as JPEG, PNG, GIF and others. In this article, we’ll discuss the pros and cons of JPEG 2000 in relation to other acceptable image formats.

What is JPEG 2000?

JPEG 2000 is an image encoding system that was created by the Joint Photographic Experts Group in 2000 with the intention of superseding the original JPEG standard. JPEG 2000 uses the state-of-the-art compression techniques based on a discrete wavelength transformation, enabling users to implement lossless compressions.

JPEG 2000 was intended to create an image coding system for many types of still images (bi-level, gray-level, color, multi-component) with different characteristics. It also would enable different imaging models, such as real-time transmission, image library archival, limited buffer and client/server, within a unified system.

It is used to compress image data that typically comes from digital cameras, scanners, frame grabbers, medical and satellite systems, and photo-retouching programs.

The goal of JPEG 2000 was to create a better version of JPEG, so let’s examine its benefits.

JPEG 2000 Features

  • Supports progressive decoding, which is an efficient code-stream that enables a viewer to see a lower quality version of a particular image while the whole file has not been fully received or downloaded. The image quality progressively improves as more data bits are downloaded from the source.

  • When compared to JPEG, which only supports lossy compression, JPEG 2000 supports lossless (bit-preserving) and lossy compression within a single codestream.

  • Offers transparency preservation in images.

  • Includes a flexible file format. It has the .jp2 and .jpx file formats, which enable handling of color-space information, metadata and interactivity in networked applications. According to the RFC 3745, the MIME types for JPEG 2000 are image/jp2, video/mj2, image/jpx, and image/jpm.

  • Offers higher compression ratios for lossy compression. According to data from case studies, JPEG 2000 can compress images from 20 percent to 200 percent more than JPEG. The peak signal-to-noise ratio or the root mean square is typically used to measure the compression efficiency for lossy compression.

  • Superior image quality compared to a JPEG file of the same size .

  • Similar to the TIFF image format, JPEG 2000 is:

    • Capable of describing bi-level, grayscale, palette-color and full-color image data in several color spaces.
    • Enables the inclusion of an unlimited amount of private or special-purpose information within the metadata of its file format.
    • Designed to be extensible and to evolve gracefully as new needs arise.
    • Developers can actually choose the best space or time tradeoff for their applications because JPEG 2000 includes a number of compression schemes.
  • Offers large image handling (greater than 64k x 64k pixels) without tiling.

  • Is capable of handling both natural and computer-generated imagery.

  • Offers a single decompression architecture.

  • Delivers low bit-rate compression performance effective down to below 0.25 bits per pixel for high resolution gray-scale images.

In a video broadcast production workflow, adopting JPEG 2000 offers several advantages too, including::

  • An intra-frame compression scheme that encodes each frame independently. This makes JPEG 2000 great for content editing applications, since the video signal can be cut at any place without repercussion.

  • Bit-errors in a JPEG 2000 create less visual artifacts than MPEG solutions.

  • Ultra low latency, which is very important for live TV content.

  • Scalability in both resolutions and quality.

  • Robust pixel shifts thus sustaining the same quality in a chain of successive compression-decompression processes over the same original material.

JPEG 2000 Limitations

As awesome as JPEG 2000 is, there are some undesirable effects that has impeded its universal use and support.

  • No universal browser support.

  • The format is not backward compatible. Users (developers, digital companies and others) wanting to use JPEG 2000 would have to code in a new standard while also supporting the original JPEG.

  • Encoding JPEG 2000 files is resource intensive (CPU intensive, new code). It requires much more memory for processing. This might not be an issue in 2017 because of how advanced our machines are now, but back in 2000 when the file format was released, it was a significant issue.

  • Websites and camera manufacturers were not ready to accept the format until it was widely adopted.

  • Encoding JPEG 2000 is not as fast and easy as encoding in JPEG.

  • It’s not content adaptive when compared to JPEG. Choosing a bitrate that is very low will make a mess of an image.The target bitrate will have to be adjusted manually depending on the content of the image.

Even though it appears that JPEG 2000 is dead in general photography space, it is king in the medical world and wireless multimedia space. Medical diagnostic imaging, such as MRI, CT or X-ray scans are likely to be encoded as JPEG 2000. It is also required for digital cinema operations. Requirements in data compression for digital cinema include high dynamic range, different color spaces, high image resolutions and lossless compression, which is made possible by using JPEG 2000.

PNG vs JPG vs JPEG 2000 vs TIFF vs BMP

The table below shows a comparison of five common image file formats:

Pros Cons File Extension Browser Support (without plugin) Creators
PNG
  • Widely supported
  • Efficient compression
  • Supports data compression and alpha
  • Lossless
  • Transparency support
  • Only supports web colors
  • Larger image files
  • Limited compatibility
  • .png
  • .apng
  • IE
  • Firefox
  • Opera
  • Safari
  • Google Chrome
PNG development group, now maintained by W3C
JPG
  • Small file size
  • Widely supported
  • Good color range
  • Not that great for text
  • Low compression ratio for lossy compression
  • .jpg
  • .jpeg
  • .jpe
  • .jif
  • .jfif
  • .jfi
  • IE
  • Firefox
  • Opera
  • Safari
  • Google Chrome
Joint Photographics Expert Group
JPEG 2000
  • Scalability in both resolutions and quality
  • Single decompression architecture
  • Lossy and lossless compression
  • No universal support
  • Encoding is CPU intensive
  • Not backward compatible
  • .jp2
  • .jpx
  • .j2c
  • .j2k
  • .jpf
  • Safari
Joint Photographics Expert Group
TIFF
  • Lossless
  • High-quality images
  • Multiple images and multiple pages can be saved in one file
  • Enables inclusion of an unlimited amount of private or special-purpose information within the metadata of its file format
  • Large file size
  • Not great for web graphics
  • Little software compatibility issues
  • .tiff
  • .tif
  • None
Adobe
BMP
  • Efficient compression
  • Supports data compression and alpha channels
  • Large file size
  • Not supported by all image editors
  • .bmp
  • .dib
  • No browser support
Microsoft
WEBP
  • Small file size
  • Lossy compression
  • .webp
  • Opera
  • Google Chrome
Google
GIF
  • Enables lossless compression
  • widely used for animation
  • widely supported by browsers
  • smaller file sizes
  • Limited to 256 colors
  • No transparency
  • .gif
  • IE
  • Firefox
  • Opera
  • Safari
  • Google Chrome
CompuServe

Conclusion

JPEG 2000 was created to be significantly better than JPEG. In a situation where you are not looking for universal browser support, then in my opinion, JPEG 2000 should be your go-to image format.

Hopefully, big companies like Sony, Panasonic and developers worldwide will aggressively start adopting the JPEG 2000 standard across board, so that it can be a widely accepted format. With that, browser engines and software authors will have more incentives to support JPEG 2000.

Prosper Otemuyiwa Prosper Otemuyiwa is a Food Ninja, Open Source Advocate & Self-acclaimed Developer Evangelist.

Recent Blog Posts

Generate Waveform Images from Audio with Cloudinary

This is a reposting of an article written by David Walsh. Check out his blog HERE!
I've been working a lot with visualizations lately, which is a far cry from your normal webpage element interaction coding; you need advanced geometry knowledge, render and performance knowledge, and much more. It's been a great learning experience but it can be challenging and isn't always an interest of all web developers. That's why we use apps and services specializing in complex tasks like Cloudinary: we need it done quickly and by a tool written by an expert.

Read more
Make All Images on Your Website Responsive in 3 Easy Steps

Images are crucial to website performance, but most still don't implement responsive images. It’s not just about fitting an image on the screen, but also making the the image size relatively rational to the device. The srcset and sizes options, which are your best hit are hard to implement. Cloudinary provides an easier way, which we will discuss in this article.

Read more

The Future of Audio and Video on the Web

By Prosper Otemuyiwa
The Future of Audio and Video on the Web

Web sites and platforms are becoming increasingly media-rich. Today, approximately 62 percent of internet traffic is made up of images, with audio and video constituting a growing percentage of the bytes.

Read more

Embed Images in Email Campaigns at Scale

By Sourav Kundu
Embed Images in Email Campaigns at Scale

tl;dr

Cloudinary is a powerful image hosting solution for email marketing campaigns of any size. With features such as advanced image optimization and on-the-fly image transformation, backed by a global CDN, Cloudinary provides the base for a seamless user experience in your email campaigns leading to increased conversion and performance.

Read more
Build the Back-End For Your Own Instagram-style App with Cloudinary

Github Repo

Managing media files (processing, storage and manipulation) is one of the biggest challenges we encounter as practical developers. These challenges include:

A great service called Cloudinary can help us overcome many of these challenges. Together with Cloudinary, let's work on solutions to these challenges and hopefully have a simpler mental model towards media management.

Read more

Build A Miniflix in 10 Minutes

By Prosper Otemuyiwa
Build A Miniflix in 10 Minutes

Developers are constantly faced with challenges of building complex products every single day. And there are constraints on the time needed to build out the features of these products.

Engineering and Product managers want to beat deadlines for projects daily. CEOs want to roll out new products as fast as possible. Entrepreneurs need their MVPs like yesterday. With this in mind, what should developers do?

Read more