Manish Gautam
Manish Gautam

Reputation: 69

Max size of Jpeg2000 image

According to Jpeg2000 specs, Xsiz & Ysiz can have values ranging from 1 to (2pow32 -1). That means Max size of jpeg2000 file should be (2pow32 -1)*(2pow32 -1) which is very huge.

Am I missing anything here? or Is there any other limitation on the Xsiz, Ysiz or image size?

Upvotes: 1

Views: 2688

Answers (1)

mhernandez
mhernandez

Reputation: 616

The maximum resolution of a JPEG 2000 compliant codestream is, as you point out, 2^32-1 x 2^32-1 pixels. However:

  • It is the decompressed file that will have a maximum size of pixels 2^32-1 x 2^32-1. However, to obtain the actual decompressed file size you need to multiply that by the number of components and the number of bytes per sample.
  • As Piglet points out, the compressed file size will (hopefully) be smaller, that's the whole point of image compression: producing compressed files smaller than the uncompressed images.
  • Even though compliant codestreams may have up to that resolution, it doesn't mean that your encoder/decoder implementation necessarily support images that big. JPEG 2000 introduced the concept of "compliance class", which is a system of guarantees of the minimum dimensions (among other things) supported by a given implementation. In practice, you're probably better off testing what the maximum supported size is.

Upvotes: 2

Related Questions