[gdal-dev] How to get additional information about JPEG 2000 using GDAL + ECW/JPG2 Intergraph SDK

Even Rouault even.rouault at spatialys.com
Wed Nov 26 08:36:42 PST 2014


Le mercredi 26 novembre 2014 15:58:21, Tomer a écrit :
> I want to be able to display additional properties of JPEG 2000 that are
> normally not available in programs like GDALINFO (with the SDK integrated).
> 
> Those properties are for example:
> PROGRESSION=LRCP/RLCP/RPCL:
> CODESTREAM_ONLY=YES/NO:
> LEVELS=n:
> LAYERS=n:
> PRECINCT_WIDTH=n:
> PRECINCT_HEIGHT=n:
> TILE_WIDTH=n:
> TILE_HEIGHT=n:
> INCLUDE_SOP=YES/NO:
> INCLUDE_EPH=YES/NO:
> DECOMPRESS_LAYERS=n:

Tomer,

You can get some of them with the opj_dump utility of OpenJPEG.

$ ~/install-openjpeg-2.1.0/bin/opj_dump -i byte.jp2

[INFO] Start to read j2k main header (2233).
[INFO] Main header has been correctly decoded.
Image info {
	 x0=0, y0=0
	 x1=20, y1=20
	 numcomps=1
		 component 0 {
		 dx=1, dy=1
		 prec=8
		 sgnd=0
	}
}
Codestream info from main header: {
	 tx0=0, ty0=0
	 tdx=20, tdy=20
	 tw=1, th=1
	 default tile {
		 csty=0x1
		 prg=0x3
		 numlayers=12
		 mct=0
		 comp 0 {
			 csty=0x1
			 numresolutions=6
			 cblkw=2^6
			 cblkh=2^6
			 cblksty=0
			 qmfbid=0
			 preccintsize (w,h)=(9,4) (9,5) (9,6) (9,7) (9,8) (9,9) 
			 qntsty=2
			 numgbits=1
			 stepsizes (m,e)=(1822,14) (1770,14) (1770,14) (1724,14) 
(1792,13) (1792,13) (1762,13) (1868,12) (1868,12) (1892,12) (3,10) (3,10) 
(69,10) (2002,10) (2002,10) (1889,10) 
			 roishift=0
		 }
	 }
}
Codestream index from main header: {
	 Main header start position=2233
	 Main header end position=2633
	 Marker list: {
		 type=0xff4f, pos=2233, len=2
		 type=0xff51, pos=2235, len=43
		 type=0xff52, pos=2278, len=20
		 type=0xff5c, pos=2298, len=37
		 type=0xff64, pos=2335, len=17
		 type=0xff64, pos=2352, len=281
	 }
}



Kakadu's kdu_jp2info should also do it.

Best regards,

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list