max width and height of jpeg 2000 image is 65535, so can be stored in

unsigned short